Shoyeb Sheikh
Shoyeb Sheikh

Reputation: 2866

how to use sshpass to a different port number

I am trying to use sshpass with port number.

sshpass -p "somepassword" scp [email protected]/somefile /somefolder

how to pass port number to sshpass ?

Upvotes: 0

Views: 2743

Answers (1)

Eliezer Berlin
Eliezer Berlin

Reputation: 3576

Add it after the IP address, with a :. For example, to use port 2222:

sshpass -p "somepassword" scp [email protected]:2222/somefile /somefolder

Upvotes: 0

Related Questions