LoginSignup
0
3

More than 5 years have passed since last update.

.ssh/config で PasswordAuthentication no に設定されているホストに一時的にパスワード認証で接続する

Posted at

以下のように公開鍵認証の設定となっているホストであっても

~/.ssh/config
Host target-host
  HostName xx.xx.xx.xx
  User no-password-user
  # 通常は公開鍵認証のみとする
  IdentitiesOnly yes
  PasswordAuthentication no
  IdentityFile ~/.ssh/secret_key  

コマンドラインで -o PasswordAuthentication=yes すれば設定をオーバライドしてくれる。

一時的にパスワード認証を使用する
$ ssh another-user@target-host -o PasswordAuthentication=yes
0
3
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
3