SSH 禁用 known_hosts 文件
Jan 03, 2025
最近在配置 GitHub 使用 ssh 方式使用 git 命令,参考这两篇文章: Using SSH over the HTTPS port Generating a new SSH key and adding it to the ssh-agent 按照文章中的配置好以后,直接进行仓库克隆等操作会报错,因为服务器指纹还没有添加到 known_hosts 文件中,解决方法也很简单,通过命令 ssh -T -p 443 [email protected] 测试连接一下,会提示添加服务器指纹,添加后再对仓库进行操作就没有问题了。 …
OpenSSH 服务器禁止密码登录方式
Dec 09, 2024
编辑 /etc/ssh/sshd_config,关闭以下和密码认证相关的选项: PasswordAuthentication no PermitEmptyPasswords no KbdInteractiveAuthentication no UsePAM no