I am trying to use sshpass with port number.
sshpass -p "somepassword" scp [email protected]/somefile /somefolder
how to pass port number to sshpass ?
I am trying to use sshpass with port number.
sshpass -p "somepassword" scp [email protected]/somefile /somefolder
how to pass port number to sshpass ?
To use sshpass with a port number, you can specify the port using the -P option. Here's how you can modify your command:
Replace <port_number> with the actual port number you want to use. For example, if the port number is 2222, the command would be:
This will allow you to use sshpass with a specific port number for SCP. The -P option in scp is used to specify the port number, and it is different from the -p option in sshpass. The -P option in scp is case-sensitive and should be in uppercase. The default SSH port is 22, but you can specify a different port using the -P option in scp when using sshpass