ssh has multiple option as same
Checks
- [X] I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
- [X] I have run
fig doctorin the affected terminal session - [X] I have run
fig restartand replicated the issue again
Operating system
macOS 13.2.1 (22D68)
Expected behaviour
Only one option for each different IP for ssh root@.
Actual behaviour
After linking the same ssh several times, when I type ssh root@ again, the option multiple identical options appear:

I checked ~/.ssh/known_hosts, and it is correct:

Steps to reproduce
Yes, it is easy to reproduce.
Just only need to link the same ssh multiple times.
Environment
fig-details:
- 2.15.0
hardware-info:
- model:
- model-id:
- chip-id: Apple M2
- cores: 8
- mem: 16.00 GB
os-info:
- macOS 13.2.1 (22D68)
environment:
- shell: /bin/zsh
- terminal: iterm
- cwd: /Users/i
- exe-path: /opt/homebrew/bin/fig
- install-method: brew
- env-vars:
- FIGTERM_SESSION_ID: 89b9b238-8876-48ad-8434-99fe1d4241c4
- FIG_SET_PARENT_CHECK: 1
- FIG_TERM: 2.15.0
- PATH: /Users/i/.local/share/fig/plugins/git-open:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/i/.fig/bin:/Users/i/.local/bin
- SHELL: /bin/zsh
- TERM: xterm-256color
- __CFBundleIdentifier: com.googlecode.iterm2
- FIG_PID: 17099
- FIG_SET_PARENT: 89b9b238-8876-48ad-8434-99fe1d4241c4
Seems like we should filter duplicates here. I think this functionality may already exist but be disabled in certain cases? cc @fedeci
It should be enabled when we have < 50 suggestions to dedupe. I'm checking later.
Hi, these duplicates are becoming millioniplicate! I did a brief scroll to see how manyplicates servers are listed, didn't realise it would give my mouse scroll wheel a run for its money! 🖱️🤯
@fedeci I have a handful of ssh servers, lets say 4 or so, the listing for one of them alone is repeated way over 50 times...
I also did what @mschrage said in this issue, https://github.com/withfig/fig/issues/2319#issuecomment-1530747035. It did not remove any listing... Again more than happy manually delete any folders or files that you might believe might be causing this issue and feedback on this thread, so that hopefully you could diagnose the root cause.
P.S I have zero servers in my fig dashboard. However if I am to add servers, it successfully autodetects 4 servers from my ~/.ssh/known_hosts 🤷♂️
I'm gonna check this!
I'm gonna check this!
any joy?
Also reproducing on my Mac
Had this issue for many months, hoping for fix!
Hi @fedeci, the various fixes suggested in the other ticket don't work. Can we do the deduplication locally until a fix is available?
/cc @mschrage