无法从AWS ubuntu实例SSH到GoDaddy Linux共享主机:对等重置连接


0

我有一个AWS帐户和一个GoDaddy Web托管帐户。在AWS上,我有一个ubuntu实例ftp-server,在GoDaddy上,我有一个linux共享托管服务器。我可以使用Windows 7上的Putty从我的工作PC SSH到两个服务器中;但是,我无法从一台服务器SSH到另一台服务器。

当我尝试从AWS实例SSH到GoDaddy服务器时,得到以下输出:

ubuntu@ip-###-##-##-##:~$ ssh -v -i /home/ubuntu/keys/godaddy-key.ppk user@###.###.##.##
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to ###.###.##.## [###.###.##.##] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/ubuntu/keys/godaddy-key.ppk type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/ubuntu/keys/godaddy-key.ppk-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
ssh_exchange_identification: read: Connection reset by peer

当我尝试从GoDaddy服务器SSH到AWS实例时,得到以下输出:

user@############ [~]$ ssh -v -i /home/user/aws-key.ppk ubuntu@aws-domain.com
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to aws-domain.com[##.###.###.###] port 22.
debug1: connect to address ##.###.###.### port 22: Connection timed out
ssh: connect to host aws-domain.com port 22: Connection timed out

我怀疑这可能与AWS安全组防火墙有关;但是,我已经仔细检查并确认GoDaddy服务器的ip地址已添加到出站和入站规则中。

作为参考,我正在尝试从服务器SSH到其他服务器,因为我计划构建一个chron脚本,以使用实例作为s3fs的中间人将GoDaddy服务器备份到Amazon S3。

Answers:


0

取决于您的实例是否在VPC中。如果您的实例在VPN中:

  1. 您需要检查安全组上的出站规则是否具有以下规定:

    所有流量全部全部0.0.0.0/0

  2. 检查您的VPC是否将网络ACL用于与您的实例关联的子网。网络ACL要求在入站和出站中打开端口。网络ACL是Stateless

对于GoDaddy服务器,建议您检查/etc/hosts.deny以及Fail2ban之类的程序,该程序会将您的(服务器)IP地址动态添加到iptabes或jail文件中。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.