http://server-setting.info/centos/sshpass-ssh-auto-connect.html
sshpass( Non-interactive ssh password authentication ) を使うとコマンドラインにてssh接続のパスワードを指定
sshpassをWindows(Cygwin)で使ってみる
http://server-setting.info/blog/sshpass-cygwin-autologin.html
$ https://tenet.dl.sourceforge.net/project/sshpass/sshpass/1.06/sshpass-1.06.tar.gz $ tar xfz sshpass-1.06.tar.gz $ cd sshpass-1.06 $ ./configure $ make $ make install
めも
sshpass -p '123456' ssh -o StrictHostKeyChecking=no \ -o UserKnownHostsFile=/dev/null hoge@192.168.2.1 \ "bash -c 'uname -a | grep foo && shutdown -h now'"