I have connected to a remote Ubuntu
host from Windows using VS Code
and using it for remote development. Often times I open different code repositories in VS Code but every time I have to open a different folder despite having the connection established the VS Code ask for password.
It seems that once we are commented to a remote host then successive opening of different folder from same host should not prompt for password.
Is there any setting I am missing or should do to resolve this or save password.
I'm assuming you're connecting to an ssh remote.
There are two ways to authenticate an ssh connection, via password and via public/private key. When using the latter you don't need to enter the password each time.
To use the public/private keys here's what you have to do:
ssh-keygen
to generate them for you and put them in the default ssh config folder ( ~/.ssh/
)ssh-copy-id
command if available (I think on windows it's not there, but you can try)~/.ssh/id_rsa.pub
) to the.ssh/authorized_keys
file on the host machineHere's a link to know more about passwordless logins via ssh: https://www.redhat.com/sysadmin/passwordless-ssh