Passing password to ssh connection on the commmand line

~$ sudo apt-get install sshpass

You can now use sshpass to provide the password in the command line as follows:

~$ sshpass -p 'mypasswd' ssh user_name@myserver.com -p 1600

Here, -p 1600 specifies that the SSH connection will be made on port 1600 of the server.

Comments

Popular posts from this blog

Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)

Using a Self signed Certificate to Run Apache2 under SSL

IPS (Image Packaging system) in Solaris 10