linux 相关记录
入门资源
方案比较和权衡
经验和最佳实践
- 使用私钥登录服务器:
- 把公钥内容放到 ~/.ssh/authorized_keys 文件里面,内容类似:
ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx+rUKLpWX ssh-key-2021-06-19
- 登录使用
ssh -i keyfilename ubuntu@servername.com
- 把公钥内容放到 ~/.ssh/authorized_keys 文件里面,内容类似:
- 允许用户使用密码登录:
- sudo passwd ubuntu (用户名) 更改用户密码
- 修改 /etc/ssh/sshd_config (ubuntu 环境)
- PasswordAuthentication no 改成 PasswordAuthentication yes
- 重启 sshd:
sudo service sshd restart
各种类库
各种文章
常见错误的原因和解决
错误描述 | 报错关键词 | 原因 | 解决方案 | 参考网址 |
---|---|---|---|---|
用私钥文件登录 linux 服务器失败 (phpstorm8) |
Algorithm Negotiation failed | 使用老的 ssh 客户端登录新的系统 新的系统默认不支持老的加密算法 |
Add below code into file: /etc/ssh/sshd_config: KexAlgorithms +diffie-hellman-group1-sha1 Ciphers +aes128-cbc |
askubuntu |
错误描述 | 报错关键词 | 原因 | 解决方案 | 参考网址 |
错误描述 | 报错关键词 | 原因 | 解决方案 | 参考网址 |
666 · 1
(点赞功能开发中)