The server I am logging into does not allow setting up SSH keys, so I have to type in a password + a code generated from a device every time I do an ssh.

What I used to be able to do on my Mac is that I would ssh to the machine, and it only asks me to type in the password the first time. After that, whenever I open a new terminal window or tab, I can ssh to the machine without having to type the password again.

I recently upgraded to the new Mac OSX. I don't know what has changed but now I have to type the password every time I open a new terminal window. I don't know anything about system security, so any help or explanation is greatly appreciated.

1 Answer 1


Enable multiple sessions over a single connection in ~/.ssh/config

host *
    controlmaster auto
    controlpath /tmp/ssh-%r@%h:%p
    ControlPersist yes

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .