Linux Trick of the day Specify Password Only Once for Multiple - TopicsExpress



          

Linux Trick of the day Specify Password Only Once for Multiple SSH Connections ----------------------------------------------------------------------- Using SSH’s ControlMaster feature you can give password only for the first session in a multiple ssh sessions. This lets you share multiple SSH sessions over a single network connection. Add the following lines to the ~/.ssh/config file. [admin@ap2v ~]$ vi ~/.ssh/config Host * ControlMaster auto ControlPath ~/.ssh/master-%r@%h:%p Save the file. Host * – all hosts ControlPath ~/.ssh/master-%r@%h:%p – Path for creating the control file, make sure that this file is not accessible by others. %r – remote login name %h – host name ( remote ) %p – port First time, when you perform SSH to a remote machine, you have to specify the password, which will create the master connection. For further ssh, scp, or sftp sessions to the same machine, you don’t need to specify the password. This is true only when the master connection is alive. During that subsequent SSH connections, it will use the existing socket that was created from the first SSH connection.
Posted on: Sat, 08 Mar 2014 07:20:28 +0000

Trending Topics



Recently Viewed Topics




© 2015