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