首席IT民工 2022-05-09 17:35 采纳率: 100%
浏览 11
已结题

virtualbox里的ubuntu无法远程(centos却可以)

问题遇到的现象和发生背景

我使用vagrant启动了若干个virtualbox的虚拟机,有centos也有ubuntu,均有独立内网ip地址

问题相关代码,请勿粘贴截图
#:systemctl status ufw
● ufw.service - Uncomplicated firewall
     Loaded: loaded (/lib/systemd/system/ufw.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: man:ufw(8)

#: systemctl status sshd
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-05-09 12:49:25 CST; 4h 39min ago
       Docs: man:sshd(8)
             man:sshd_config(5)
   Main PID: 798 (sshd)
      Tasks: 1 (limit: 4612)
     Memory: 5.7M
     CGroup: /system.slice/ssh.service
             └─798 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

May 09 12:49:25 ubuntu sshd[798]: Server listening on 0.0.0.0 port 22.
May 09 12:49:25 ubuntu sshd[798]: Server listening on :: port 22.
May 09 12:49:25 ubuntu systemd[1]: Started OpenBSD Secure Shell server.
May 09 12:49:28 ubuntu sshd[982]: Accepted publickey for vagrant from 10.0.2.2 port 65349 ssh2: RSA SHA256:nEXC6zpA3BNnU>
May 09 12:49:28 ubuntu sshd[982]: pam_unix(sshd:session): session opened for user vagrant by (uid=0)
May 09 12:49:29 ubuntu sshd[982]: pam_limits(sshd:session): unknown limit type 'seft'
May 09 17:15:46 ubuntu sshd[1739]: Accepted publickey for root from 192.168.1.111 port 50554 ssh2: RSA SHA256:sJM1d8sU+4>
May 09 17:15:46 ubuntu sshd[1739]: pam_unix(sshd:session): session opened for user root by (uid=0)
May 09 17:16:38 ubuntu sshd[1919]: Accepted publickey for root from 192.168.1.101 port 60324 ssh2: RSA SHA256:0nX3TyeV53>
May 09 17:16:38 ubuntu sshd[1919]: pam_unix(sshd:session): session opened for user root by (uid=0)
运行结果及报错内容

今天使用vagrant halt关闭了所有虚拟机并重启物理机后再次vagrant up打开各个虚拟机,结果就出问题了
centos能够正常ssh,ubuntu无法ssh
powershell

PS C:\Users\Administrator> ssh root@192.168.1.102
ssh: connect to host 192.168.1.102 port 22: Connection timed out

xshell

Host 'ubuntu.kamputer.online' resolved to 192.168.1.102.
Connecting to 192.168.1.102:22...
Could not connect to 'ubuntu.kamputer.online' (port 22): Connection failed.

Type `help' to learn how to use Xshell prompt.

但是从centos上能够ssh上ubuntu
试了多台服务器均是如此

我的解答思路和尝试过的方法

我试了xshell和powershell均无法连接

我想要达到的结果

通过xshell能够正常ssh登录ubuntu

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 5月17日
    • 创建了问题 5月9日

    悬赏问题

    • ¥100 用两台电脑局域联网进行MT5的EA参数优化,但是连接不上
    • ¥15 FastAPI报错: AsyncSession不是有效Pydantic类型
    • ¥30 python写递归代码
    • ¥50 这Mac系统提示虚拟内存不足,怎么解决
    • ¥15 Rs232电路无法收发数据,求帮助
    • ¥15 百度cookie扫码登录器
    • ¥15 微机原理汇编语言debug调试实验
    • ¥23 matlab可以把相图转换为庞加莱映射吗
    • ¥15 Arduino电机和openmv连接异常
    • ¥15 Arcgis河网分级报错