公司某些服務器沒法ssh阿裏雲服務器的解決方法
1)在公司網絡某些主機上的ssh阿裏雲主機報錯:
----------------------------------------------------------------------------
OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug1: Connecting to 106.14.204.65 [106.14.204.65] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
ssh_exchange_identification: read: Connection reset by peer
----------------------------------------------------------------------------
2)阿裏雲安全組中策略已經對公司外網的IP地址放行。
3)阿裏雲服務器上/etc/hosts.allow裏面也參考https://help.aliyun.com/knowledge_detail/41470.html
# cat /etc/hosts.allow|tail -1
sshd: ALL
# systemctl restart sshd
二、解決方法
雲盾控制臺->DDos防護->基礎防護->點擊具體的實例->掃描攔截->白名單設置->添加您的本地IP,再嘗試是否能遠程
添加完白名單,然後再次測試,告警消失。
公司某些服務器沒法ssh阿裏雲服務器的解決方法