我可以在USER@HOST
没有密码的情况下使用 ssh 登录服务器,但如果我输入ssh usdev
配置~/.ssh/config
如下所示的密码,则需要密码:
Host usdev
HostName HOST
User USER
IdentityFile /Users/USER/.ssh/id_rsa_us_east
这是 ssh usdev 的日志文件的一部分:
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/USER/.ssh/id_rsa_us_east RSA SHA256:xgKp1AxWfSaujfWqlJe3G4kUioRbuICDDJ2645VVVAs explicit
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: password