使用私有网络 IP 地址的本地 SSH 连接不起作用

使用私有网络 IP 地址的本地 SSH 连接不起作用

我尝试通过 ssh 连接到本地机器本身

ssh me@host -p 2222 

提示密码登录

然而,如果尝试

    $ ssh [email protected] -p 2222
    ssh: connect to host 192.168.31.127 port 2222: No route to host


the ip address:

    $ ssh [email protected] -p 2222
    ssh: connect to host 192.168.31.127 port 2222: No route to host

本地主机127.0.0.1工作

$ ssh [email protected] -p 2222
The authenticity of host '[127.0.0.1]:2222 ([127.0.0.1]:2222)' can't be established.
ECDSA key fingerprint is SHA256:rWQnXUO8mSlXRgNN4Jp1HMNqIO6K7WBO3EAihzvc3Es.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of known hosts.
***************************************************************************
                            NOTICE TO USERS

有什么问题?

相关内容