0
Does anyone know what could be the reason behind WSL not being able to SSH to a remote host, even though when using PUTTY, MobaXterm, XShell or even just Windows Powershell, the connection is clearly allowed and working?
PS. Don't mind the ping result, turns out ICMP is blocked by FW by default, so it doesn't work on PS either, yet the SSH is able to connect. PS2. Is it possible that WSL is using some ports (which would be different from the ones used by PS or apps such as PUTTY) which are blocked by my company? (When I try to ssh into my own private server using my own home private network, SSH from WSL does indeed work)
Please remove and re-upload WSL screenshot, as it has a WAN IP clearly visible. Does
Resource temporarily unavailable
imply that port is in use? Please post the log of te connection attempt, asFATAL ERROR: connection refused
could result from a number of things and is not enough information to troubleshoot. – JW0914 – 2019-11-28T13:40:00.343Thank you very much for pointing that out to me. I already re-uploaded the image. As for the logs of the connenction attempts, could you tell me how I could retrieve them? The bash command-line didn't display any other errors except for what's visible on the attached screenshot and since I've never encountered that issue before, alas I'm not familiar with the commands used to get such outputs. – Martin Ledermann – 2019-11-28T13:53:41.003
I generally don't use
plink
directly, as I prefer the customizations of the PuTTY terminal, but fromplink --help
it seems-sshlog c:\logfile
should work (please also anonymize before posting log content) – JW0914 – 2019-11-28T13:57:25.093Unfortunately those log entries won't be very helpful to us, I'm afraid. I've attached them to my post but it's only stated that the conection was refused, even though using Windows Putty works for the very same IP and port. – Martin Ledermann – 2019-11-28T14:17:59.963
Do you think that it's possible that WSL is somehow blocked by my company? (which would be odd, given that I can ssh into that server using a number of other methods anyway). If so, how could that be achieved? Is WSL using different ports/sockets than Win PS, PuTTY, MobaXTerm and all the rest? – Martin Ledermann – 2019-11-28T14:19:46.877
The issue lies with the server then, so the server's log will need to be reviewed to determine why it's refusing the connection. – JW0914 – 2019-11-28T14:54:25.370