I set up a (Ubuntu) virtual machine using Hyper-V on my Windows machine(Windows 10 Enterprise Edition OS) , but it seems my school network security rule does not allow me to share the internet to the VM, so I want to set up a ssh tunnel (to allow internet access on the VM for easy package installation using apt install
).
I installed OpenSSH-Win64 on the windows machine. But when I try to connect from the ubuntu VM, it gives me error:
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: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Connection reset by 150.203.213.249 port 22
I don't know where to look. Some check from the 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)
I have manually added a file hosts.allow
in C:\Windows\System32\drivers\etc
with the following content:
sshd: 150.203.213.248
It did not make any difference.