我在虚拟机上使用 Ubuntu,并尝试通过 ssh 连接到它(从 Mac)。
版本:
这是命令:
ssh -vvv -p 4219 [email protected]
这是输出:
OpenSSH_7.4p1, LibreSSL 2.5.0
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: /etc/ssh/ssh_config line 53: Applying options for *
debug2: resolving "192.168.56.3" port 4219
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 192.168.56.3 [192.168.56.3] port 4219.
debug1: connect to address 192.168.56.3 port 4219: Can't assign requested address
ssh: connect to host 192.168.56.3 port 4219: Can't assign requested address
是的,我在虚拟机上安装了 ssh,并且它正在运行。以下是我检查的方法:
service ssh status
是的,我已将 sshd_config 文件更改为列出端口 4219
当我检查端口是否处于主动监听状态时,我得到了以下信息:
命令:
sudo netstat -anp | grep -w LISTEN
输出: