1

So there is a server which has port knocking (e.g by using linux subsystem for windows) I can easily ssh to by

$ knock -v "ip of the server" Xport:udp Yport:udp Zport:udp

$ ssh -i ~/.ssh/test2 "username@"ip of the server" -p "custom port set for ssh"

but I would like to use Visual Studio Code https://code.visualstudio.com/download

It has an ssh-plug in but trying to connect to the server always returns an error.

this is how I have set the configuration file

Host <ip of the server>:<customport>
HostName <ip of the server>:<customport>
User <username>
IdentityFile   C:\Users\Admin\.ssh\test2

test2 is my private key (which I also use just fine when trying to connect with the linux console) and I copied that to the directory visible in the config file.

I am not sure that the root of the issue is due to port knocking since I tried manually (using my linux subsystem for windows console from the same machine and network) to knock the ports before trying to connect with visual studio code but it doesnt work

I also tried to add this line to the configuration file

BatchMode wls knock -v "ip of the server" Xport:udp Yport:udp Zport:udp

In hopes that MVScode will knock the ports that way (wls is an executable that allows you to run linux console commands on CMD if I open CMD for example and run wls ls it will list the files on the linux subsystem within the cmd window, also tried to knock the ports that way and worked as well)

But I still am getting errors.

Any solution you could think of? Thanks.

P.S In case it is not apparent by now the taget server runs linux (Debian to be exact) Also the system that I run VisualStudioCode runs Windows 10.

0

You must log in to answer this question.

Browse other questions tagged .