常见问题1
-- 目录以及文件权限不对,一定要严格确保
chmod 700 .ssh
chmod 600 .ssh/authorized_keys
常见问题2
常见问题3
-- ssh, sftp都可以正常连接,但是使用java code去调用jar包时,ssh或者sftp全部不可以。
## rhel7,rhel8 ssh cipher
> rhel8.4 开始后,安全性更高,同时 在使用java从 rhel7 通过ssh连接到rhel8 的兼容性需要特别设置,否则会出现ssh在握手时出现cipher找不到而需要通过修改ssh支持的cipher或者从java端安装更高的jar包解决此类问题。
-- 这里需要注意,ssh或者sftp都能正常从rhel7到rhel8,但是通过java去调用ssh时 就是无法联通, 可以参考此处修改cipher - https://blog.csdn.net/YinShiJiaW/article/details/103295620
-bash-4.2$ ssh -Q cipher
3des-cbc
blowfish-cbc
cast128-cbc
arcfour
arcfour128
arcfour256
aes128-cbc
aes192-cbc
aes256-cbc
rijndael-cbc@lysator.liu.se
aes128-ctr
aes192-ctr
aes256-ctr
aes128-gcm@openssh.com
aes256-gcm@openssh.com
chacha20-poly1305@openssh.com
-bash-4.2$ uname -a
Linux node1 3.10.0-1160.88.1.el7.x86_64 #1 SMP Tue Mar 7 15:41:52 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux <<< rhel7