Link

Ubuntu SSH相关

目录

  1. Ubuntu SSH相关
    1. SSH 使用的算法集
    2. 修改server端的cipher

SSH 使用的算法集

有些时候会遇到 SSH、SCP、SFTP 等协议对接问题,一般此类问题可能是由于 Client、Server 的对称加密算法、哈希算法等不匹配,遇到此类问题可以使用下列命令查看双方SSH用的是那些算法,有没有重叠的部分。

root# ssh -Q kex
diffie-hellman-group1-sha1
diffie-hellman-group14-sha1
diffie-hellman-group-exchange-sha1
diffie-hellman-group-exchange-sha256
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521
[email protected]

root# ssh -Q key
ssh-ed25519
[email protected]
ssh-rsa
ssh-dss
ecdsa-sha2-nistp256
ecdsa-sha2-nistp384
ecdsa-sha2-nistp521
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

root# ssh -Q cipher
3des-cbc
blowfish-cbc
cast128-cbc
arcfour
arcfour128
arcfour256
aes128-cbc
aes192-cbc
aes256-cbc
[email protected]
aes128-ctr
aes192-ctr
aes256-ctr
[email protected]
[email protected]
[email protected]

root# ssh -Q cipher-auth
[email protected]
[email protected]
[email protected]

root# ssh -Q mac
hmac-sha1
hmac-sha1-96
hmac-sha2-256
hmac-sha2-512
hmac-md5
hmac-md5-96
hmac-ripemd160
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

修改server端的cipher

修改此文件:/etc/ssh/sshd_config

Ciphers aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc