11

强制ssh使用密码认证登陆服务器

 3 years ago
source link: https://www.lujun9972.win/blog/2017/02/19/%E5%BC%BA%E5%88%B6ssh%E4%BD%BF%E7%94%A8%E5%AF%86%E7%A0%81%E8%AE%A4%E8%AF%81%E7%99%BB%E9%99%86%E6%9C%8D%E5%8A%A1%E5%99%A8/index.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
强制ssh使用密码认证登陆服务器 - 暗无天日

强制ssh使用密码认证登陆服务器

有时为了测试服务器是否支持密码登陆,虽然本地配置了公钥认证,也需要强制让ssh client使用密码认证登陆。

方法是,使用

ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no user@host

PreferredAuthentications=password

ssh client登陆服务器时,默认会依次尝试 GSSAPI-based认证, host-based认证, public key认证, challenge response认证, password认证 这几种认证方式.

但是使用 PreferredAuthentications 选项可以修改这个顺序

PublicAuthentication=no

表示关闭公钥认证方式. 这样就能保证当服务端不支持密码认证时,也不会使用公钥认证.

2017-02-19 2017-02-19 linux和它的小伙伴 lujun9972

Related Issues not found

Please contact @lujun9972 to initialize the comment

Generated by Emacs 27.x(Org mode 9.x)

Copyright © 2014 - 2021 lujun9972   -   Powered by EGO
Themed with emacs_love


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK