you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (1 child)

I'm just a student so shoot me if I'm ass-backwards on this, but can you save each ssh target address (me@ip) as a variable in your bash profile? Like A=me@ip1 B=me@ip2 and then use ssh $A ssh $B to connect? For a menu you could make a variable $sshmenu that contains all the ip variables in a list. echo $sshmenu returns A=me@ip1 etc...

[–]billfolddog 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (0 children)

You can, but I highly recommend you use your ssh config file instead.

https://linuxize.com/post/using-the-ssh-config-file/

If you format it correctly, you can just type ssh myserver and the correct username, port number, and cryptographic keys will automatically be used.

Even better, many applications will refer to your config file. Nautilus can mount an SSH target as attached media, and it will use your SSH config file to streamline configuring the mount point. In many cases, this is the only way to make that work.