0

I can successfully connect from my macbook+VPN to my corporative cloud server through ssh with this command (passwordless, using my id_ed25519 key):

ssh login@ip@gateway -A

But I need to connect to this server inside VSCode. I created server's config like this:

Host servername
    HostName ip
    User login
    ForwardAgent yes
    ProxyJump gateway

and it does not work, I'm sure doing smth wrong. After I pressing "connect", VSCode requires "Please enter server host name".

The way from ChatGPT:

Host servername
    HostName ip
    User login
    HostKeyAlias servername
    ProxyCommand ssh -W %h:%p login@gateway -A
    ForwardAgent yes

How should I create ssh-config to repeat my successful connection string ?

Note:
ip is smth like "123.123.222.3".
gateway is smth like "v00gateway01.corp.company.com"

2 Answers 2

0

Try wtite the path to your ssh key in this config (I'm not sure about syntax)

2
  • Not working. I believe -A option is choosing my single possible key automatically
    – klapeyron
    Commented Feb 13, 2023 at 18:49
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Feb 13, 2023 at 19:11
0

Solved with this ssh_config:

Host servername
    HostName gateway
    User login@ip
    ForwardAgent yes
    IdentityFile ~/.ssh/id_ed25519

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .