LoginSignup
15
12

More than 5 years have passed since last update.

known_hostsを無視してsshで接続してリモートでコマンド実行

Posted at

よくJenkinsの「シェルの実行」に設定して使っているのでメモ.

ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -t -t -i /path/to/.ssh/id_rsa hoge@hoge.com "cd /home/hoge/scripts;
php batch.php foo bar"
15
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
12