beNice beNice - 1 year ago 372
Linux Question

sshpass not recognize on windows

I want to run sshpass command from my windows to remote linux server. i used this command:

sshpass -p ‘password’ ssh -l root -o StrictHostKeyChecking=no

But my cmd return below error statement:

‘sshpass’ is not recognized as an internal or external command,
operable program or batch file.

I think this is because windows dont have sshpass package as linux do. from linux i have to install sshpass package to be able to run this command.

is there anybody know how to run sshpass command through windows command line?

  • this question was actually taken from here

Answer Source

You cant run sshpass in windows. You can however use putty via the windows command line, to achieve the same thing.

putty -load "host" -l username -pw password

Also you can upload files via command line (with a password) using WinSCP

winscp /command "option batch abort" "option confirm off" "open s" "put examplefile.txt /home/user/" "exit"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download