2011-06-08から1日間の記事一覧

expectを使ってパスワードをscpで自動入力する例

expectコマンドがない場合CentOSだと yum install expect とかする。#!/usr/bin/expect set timeout 5 spawn scp hoge@xxx.xxx.xxx.xxx:/home/hoge/are.log /var/hoge/log/ expect "password:" send "ぱすわーど\r" interact

[Mac]sshでパスワード認証をOKにしたい時

PasswordAuthentication yes ChallengeResponseAuthentication yes UsePAM yes 上記を/etc/sshd_configに記述。