Using Iterm2 for an ssh client

3,405 views
Skip to first unread message

capp...@gmail.com

unread,
Mar 13, 2021, 9:46:41 PM3/13/21
to iterm2-discuss
I've recently googled for ssh client for MacOS, surprisingly iterm2 was at the top of the list.
By ssh client, I was hoping for a GUI where I could configure each login separately as well as have it remember my login credentials so that i don't have to remember passwords. I use a password manager for my website logins, but that won't help me with ssh sessions at the command line.

I use this "remote client" on Windows for all of my ssh logins"

Obviously, it won't work on MacOS.

1.
Is there a way to have iterm2 remember my ssh passwords so that I don't need to enter them each time I connect?

2.
Is there a way to configure iterm2 to log me into two systems, as in a "nested session"?
That is, I ssh to machine1, from machine1 I would ssh to machine 2. So I need to remember and enter passwords for both machines. It wouldbe great if I could configure iterm2 to do this for me.

Thanks

Jan Dubois

unread,
Mar 14, 2021, 1:12:32 AM3/14/21
to iterm2-...@googlegroups.com
I would strongly recommend that you switch to using "ssh keys" instead of passwords to authenticate with your remote systems. They are much more secure than using passwords.

On OS X the passphrase for your private keys can be stored by the "ssh agent" in the OS X keychain, so you never have to enter it.

And using "ssh agent forwarding" means your nested session scenario can also be made to work automatically.

Please google for the terms "ssh keys", "ssh agent", and "agent forwarding". It may be a bit overwhelming at first, but is totally worth learning about!

As you already suspected, none of this is really related to iterm beyond the fact that you use iterm to launch your ssh sessions...

Cheers,
-Jan

--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/c207b4ad-c535-4b8e-b252-29d8dbf117c6n%40googlegroups.com.

capp...@gmail.com

unread,
Mar 14, 2021, 1:55:46 AM3/14/21
to iterm2-discuss

Thanks. I know what sshkeys are as I use them for bitbucket and github.
I didn't know I should also use them for cmd line sessions, but will look into this. It makes better sense than my previous approach, and it also looks like it will handle the nested ssh session issue to.

Adrian Bool

unread,
Mar 14, 2021, 4:51:53 AM3/14/21
to iterm2-...@googlegroups.com

Hi Jan,

Whilst echoing the advice to use SSH keys for securing your SSH sessions; in direct answer to your question, check out RoyalTSX.  This app hosts multiple remote session types including SSH (using an iTerm2 based plugin).

Personally, I use iTerm (with SSH keys) for all my SSH sessions and use RoyalTSX for RDP sessions — but you could use RoyalTSX for all your SSH sessions if that fits the way you work better.

(RoyalTSX includes credential management; based upon a master password.  Be sure select the encryption option for your RoyalTSX files!)

Kind regards,

aid


Reply all
Reply to author
Forward
0 new messages