记录一次阿里云ssh登录失败原因
2018-03-13 19:41
323 查看
自从上次重装阿里云搭建了Web服务器之后一直没有ssh连接过,今天再次连接时一直提示操作超时
ssh root@x.x.x.xssh: connect to host x.x.x.x port 22: Operation timed out
检查了机器的防火墙和阿里云的防火墙发现没有问题,然后修改了ssh端口连接依然不成功。
telnet可以连接成功说明不是防火墙问题
telnet x.x.x.x 10022Trying x.x.x.x...Connected to x.x.x.x.Escape character is '^]'.
于是添加-v参数查看连接时的debug信息
ssh -p 10022 root@x.x.x.x -vOpenSSH_7.6p1, LibreSSL 2.6.2debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 48: Applying options for *debug1: Connecting to x.x.x.x port 10022.debug1: Connection established.debug1: identity file /Users/jiangzhou/.ssh/id_rsa type 0debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_rsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_dsa type -1debug1: key_load_public: No such file or
4000
directorydebug1: identity file /Users/jiangzhou/.ssh/id_dsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_ecdsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_ecdsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_ed25519 type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_ed25519-cert type -1debug1: Local version string SSH-2.0-OpenSSH_7.6ssh_exchange_identification: read: Operation timed out
百度之后发现了很多说法,最终尝试可行方案:
1、首先通过阿里云后台登录到ECS
2、执行
chmod 600 /etc/ssh/*
systemctl restart sshd
3、成功连接
ssh root@x.x.x.xssh: connect to host x.x.x.x port 22: Operation timed out
检查了机器的防火墙和阿里云的防火墙发现没有问题,然后修改了ssh端口连接依然不成功。
telnet可以连接成功说明不是防火墙问题
telnet x.x.x.x 10022Trying x.x.x.x...Connected to x.x.x.x.Escape character is '^]'.
于是添加-v参数查看连接时的debug信息
ssh -p 10022 root@x.x.x.x -vOpenSSH_7.6p1, LibreSSL 2.6.2debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 48: Applying options for *debug1: Connecting to x.x.x.x port 10022.debug1: Connection established.debug1: identity file /Users/jiangzhou/.ssh/id_rsa type 0debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_rsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_dsa type -1debug1: key_load_public: No such file or
4000
directorydebug1: identity file /Users/jiangzhou/.ssh/id_dsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_ecdsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_ecdsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_ed25519 type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/jiangzhou/.ssh/id_ed25519-cert type -1debug1: Local version string SSH-2.0-OpenSSH_7.6ssh_exchange_identification: read: Operation timed out
百度之后发现了很多说法,最终尝试可行方案:
1、首先通过阿里云后台登录到ECS
2、执行
chmod 600 /etc/ssh/*
systemctl restart sshd
3、成功连接
相关文章推荐
- 华为交换机SSH登录失败原因
- ssh公私钥正确的情况下免密登录失败原因
- 记一次PAM failure导致的ssh登录VPS失败
- 关于centos ssh无密登录失败的记录
- 记一次诡异的 ssh 互信免密码登录失败
- Android WebView加载缓存文件失败的原因记录
- Hadoop SSH免密码登录以及失败解决方案
- rails中使用devise,怎么样记录登录成功和登录失败
- ssh登录很慢,登录上去后速度正常,这种情况主要有两种可能的原因
- ssh免密码登录记录
- 用户 'IIS APPPOOL\admin' 登录失败。 原因: 基于令牌的服务器访问验证失败,出现基础结构错误。请检查以前的错误
- 用户 'sa' 登录失败。原因: 未与信任 SQL Server 连接 的解决方法SQL Server 连接相关联。
- ssh登录失败
- 记录一次***事件(redis 未授权漏洞利用直接登录服务器)
- 一个SSH 公钥登录失败的问题及解决经验
- 记录一次失败的按键输入实验
- 登录失败:用户帐户限制。可能的原因包括不允许空密码登录时间限制或强制的策略限制。
- [由于远程方关闭传输流,身份验证失败]一次处理支付接口bug记录
- ssh登录失败:Host key verification failed
- SSH远程登录失败,提示“Password authentication failed”