V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
twosix
V2EX  ›  Linux

ssh 不到阿里云服务器会是什么问题啊?

  •  
  •   twosix · 2021-11-24 18:06:46 +08:00 · 2621 次点击
    这是一个创建于 874 天前的主题,其中的信息可能已经有所发展或是发生改变。
    打开日志显示一直卡在这个地方:
    debug1: Connection established.
    debug1: identity file /root/.ssh/id_rsa type 0
    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: identity file /root/.ssh/id_xmss type -1
    debug1: identity file /root/.ssh/id_xmss-cert type -1
    debug1: Local version string SSH-2.0-OpenSSH_7.8
    7 条回复    2021-11-25 08:40:20 +08:00
    wangyu17455
        1
    wangyu17455  
       2021-11-24 19:35:54 +08:00
    是不是安全组开没开 ssh 端口,是不是允许密码 /公钥登录,是不是允许 root 登录
    三板斧解决百分之 90 问题
    xwayway
        2
    xwayway  
       2021-11-24 19:59:04 +08:00
    @wangyu17455 还遇到过一个问题,选择的网络按量计费,但是账户没钱了,谁能想到呢
    rooftop64
        3
    rooftop64  
       2021-11-24 20:03:54 +08:00
    先从阿里云控制台 /VNC 进去看下 ssh 服务,ssh 本机试下

    这样没问题的话,考虑下是不是安全组或者 iptables 没放开端口
    ScaredHeart
        4
    ScaredHeart  
       2021-11-24 20:19:36 +08:00
    如果是公钥登陆,要求客户端公钥所在目录权限是足够安全的。之前遇到过 windows ssh 上 debian 一直失败,检查下来发现是 windows 下面 ~/.ssh 的目录权限是「所有人」,将其重新设置成「管理员」就解决了。 也是开 ssh debug 模式 对比日志发现的。
    SingeeKing
        5
    SingeeKing  
       2021-11-25 03:45:03 +08:00
    看样子是请求被 drop 掉了,检查下安全组和服务器防火墙吧
    FAQ999
        6
    FAQ999  
       2021-11-25 08:32:34 +08:00
    先去控制台,投个命令看是否正常投放,如果不能投放就是服务器被攻击了或者其他。
    正常投放后再按照常规的安全组 /网络 /端口等检测。
    istevenshen
        7
    istevenshen  
       2021-11-25 08:40:20 +08:00
    先看看 ip 能不能 ping 通,可以 ping 通再检查一下端口或者防火墙之类有没有问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3333 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 13:12 · PVG 21:12 · LAX 06:12 · JFK 09:12
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.