I am on an issue since a while, getting urgent, and not super confident in the Windows sphere. I have a desktop at work that functions as my test desktop. To try software, etc, I installed Hyper-V and runs VM's on it containing the software. I'd like then to contact to those services (be it SSH or web) via my work laptop on which I do the actual work. I try to connect to them via SSH over port forwarding, but always get a timed-out error. I can connect to the VM via the Hyper-V host. I can not ping the machine but this is something that is "normal" based on my local IT. Thank you, cheers.
I have a VM with a running OpenSSH instance. This can be tested by SSH'ing from the Hyper-V host into the VM:
Hyper-V Host
PS C:\Users\u0130210> ssh -p 2023 [email protected]
[email protected]'s password:
You can also already see the ports I used for port-forwarding on the Hyper-V host. You can see two ways how I did the port-forwarding, as different tests to get it to work.
PS C:\> netsh interface portproxy show v4tov4
Listen on ipv4: Connect to ipv4:
Address Port Address Port
--------------- ---------- --------------- ----------
10.34.182.46 8083 172.27.41.98 8083
10.34.182.46 2022 172.27.41.98 22
0.0.0.0 2023 172.27.35.147 22
The listen-on ports are also authorized in the Windows Firewall:
PS C:\> Get-NetFirewallPortFilter |
>> Where-Object { $_.LocalPort -eq 2023 } |
>> Get-NetFirewallRule
Name : {745714F1-8035-462F-BE70-12BD61838B6A}
DisplayName : Slurm VM
Description :
DisplayGroup :
Group :
Enabled : True
Profile : Domain
Platform : {}
Direction : Inbound
Action : Allow
EdgeTraversalPolicy : Block
LooseSourceMapping : False
LocalOnlyMapping : False
Owner :
PrimaryStatus : OK
Status : The rule was parsed successfully from the store. (65536)
EnforcementStatus : NotApplicable
PolicyStoreSource : PersistentStore
PolicyStoreSourceType : Local
RemoteDynamicKeywordAddresses : {}
PolicyAppId :
But from the remote laptop, I can not connect to it: Remote laptop
C:\Users\u0130210>ssh -v -p 2023 [email protected]
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug1: Reading configuration data C:\\Users\\u0130210/.ssh/config
debug1: Connecting to 10.34.182.46 [10.34.182.46] port 2023.
debug1: connect to address 10.34.182.46 port 2023: Connection timed out
ssh: connect to host 10.34.182.46 port 2023: Connection timed out
I also see nothing appear on Wireshark on the Hyper-V host. Maybe I use it wrong, but I filter on the physical ethernet port with filter: "tcp.port == 2023 || tcp.port == 22"
I am unsure what else needs to be done. Let me know if you need more information. I asked our local IT and there should be no external firewall in between both machines. They are even on the same switch.
Both IP's are on the same subnet:
Hper-V Host: 10.34.182.46/21
Laptop: 10.34.177.213/21