0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

SSH のポート番号を変更したサーバーに対して Ansible を実行する

Posted at

セキュリティのために、通常 22番ポートの SSH を別のポート番号にすることってありますよね。

SSH のポート番号を変更したサーバーに対して、 ansible-playbook をかけようとしてハマったのでメモ。
--ssh-extra-agrs を使います。

例えば、SSH のポートが 8888 のサーバーに対して実行する場合は以下のような感じ。

Sample
ansible-playbook --ssh-extra-args '-p 8888' 〜それ以外のパラメーター〜
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?