Hi - I frequently run commands, and transfer files to/from a host that uses SecurID ssh authentication. It is a real pain to have to enter the authentication information every time I want to interact with this host. I am wondering if there is a way to establish a one-time ssh connection to this host and do everything through this connection. Is this the same as ssh tunneling? For example, I may want to execute a script on my local host that copies files to this host and then submits a pbs job. Is there any way I can do this through the already established ssh connection so that I don't have to enter my authentication information every time as long as the ssh connection remains active. Thanks!
Yes, there is a way.
Place the following entry in the ~/.ssh/config file.
host *
controlmaster auto
controlpath /tmp/test_ssh-%r@%h:%p
So whenever you make the first connection, it will create a socket and further connections will be tunneled through that, and no authentication after the first connection & it is also until it persists.
You can change the control path, also you can control it for particular hosts.
Let us know whether it helped ?!
It worked! Thanks!