我已在 VMware® Workstation 14 Player 上安装了 ubuntu。
我可以使用 ifconfig 查看 ip:
eth0 Link encap:Ethernet HWaddr 00:0c:29:65:af:66
inet addr:192.168.223.129 Bcast:192.168.223.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe65:af66/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:337 errors:0 dropped:0 overruns:0 frame:0
TX packets:362 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:40108 (40.1 KB) TX bytes:34591 (34.5 KB)
Interrupt:19 Base address:0x2000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:686 errors:0 dropped:0 overruns:0 frame:0
TX packets:686 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:54536 (54.5 KB) TX bytes:54536 (54.5 KB)
当我尝试通过 ssh 或 putty 连接时,它没有连接并返回消息:
ssh 192.168.223.129
ssh: connect to host 192.168.223.129 port 22: Connection refused
答案1
您需要在 ubuntu 上安装 ssh 服务器:
sudo apt-get install openssh-server
现在启动并启用 debian ssh 服务器在系统重新引导时启动。
systemctl start ssh.service
systemctl enable ssh.service
另请运行 netstat 命令以确保 ssh 端口 22 已打开并正在运行。
netstat -tulnp | grep 22
然后尝试访问...