窗口上的openssh设置:连接重置

我在Windows机器(Windows 10企业版操作系统)上使用Hyper-V设置了一个(Ubuntu)虚拟机,但似乎我的学校networking安全规则不允许我共享互联网到虚拟机,所以我想设置build立一个SSH通道(允许在VM上访问互联网,以便使用apt installapt install软件包的apt install )。

我在Windows机器上安装了OpenSSH-Win64。 但是当我尝试从Ubuntu虚拟机连接,它给了我错误:

 miranda@ubuntu-vm:~$ ssh -v 'cecs-030929\admin-u5214628'@150.203.213.249 OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to 150.203.213.249 [150.203.213.249] port 22. debug1: Connection established. debug1: identity file /home/miranda/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /home/miranda/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/miranda/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/miranda/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/miranda/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/miranda/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/miranda/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/miranda/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6 debug1: match: OpenSSH_7.6 pat OpenSSH* compat 0x04000000 debug1: Authenticating to 150.203.213.249:22 as 'cecs-030929\\admin-u5214628' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: [email protected] debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY Connection reset by 150.203.213.249 port 22 

我不知道在哪里看。 从Ubuntu VM中检查一下:

 miranda@ubuntu-vm:~$ tcpdchk miranda@ubuntu-vm:~$ tcpdchk -v Using network configuration file: (null) miranda@ubuntu-vm:~$ ifconfig eth0 Link encap:Ethernet HWaddr 00:15:5d:d5:f9:07 inet addr:150.203.213.248 Bcast:150.203.213.255 Mask:255.255.255.0 inet6 addr: fe80::215:5dff:fed5:f907/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:104320 errors:0 dropped:0 overruns:0 frame:0 TX packets:369 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:16960579 (16.9 MB) TX bytes:65010 (65.0 KB) 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:61438 errors:0 dropped:0 overruns:0 frame:0 TX packets:61438 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:5382563 (5.3 MB) TX bytes:5382563 (5.3 MB) 

我已经手动添加一个文件hosts.allowC:\Windows\System32\drivers\etc与以下内容:

 sshd: 150.203.213.248 

它没有任何区别。