Execute ssh with password authentication via windows command prompt

后端 未结 5 939
走了就别回头了
走了就别回头了 2020-12-07 13:02

I need to execute ssh from windows command line by providing password in a non interactive manner. I could implement the key based authenti

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 13:38

    The sshpass utility is meant for exactly this. First, install sshpass by typing this command:

    sudo apt-get install sshpass
    

    Then prepend your ssh/scp command with

    sshpass -p '' 
    

    This program is easiest to install when using Linux.

    User should consider using SSH's more secure public key authentication (with the ssh command) instead.

提交回复
热议问题