My local computer with Windows 10 OS is the machine I'm lunching VS Code on, to connect to my Virtual Machine running Ubuntu 20.04 LTS.
On my local computer with Windows 10 OS I'm logged in as spinn
, which becomes the default login for SSH connection lunched from VS Code, which is not the login I need for this SSH connection.
Following this video: [https://youtu.be/GEA4t1Z1OP4][2]
I've created config
file in .ssh
folder on my local Windows 10 machine.
It looks like this:
Host 172.105.88.119:???? # I've changed my port number into ????, because I didn't want to share it here.
HostName 172.105.88.119:???? # I've changed my port number into ????, because I didn't want to share it here.
User shrek
Despite specifying user name in this config
file, VS Code still populates user for SSH connection as spinn
, which is the user name I'm logged in on my local Windows 10 computer.
There was never any dialog box to choose the user name I want to SSH as.
There is no spinn
user on remote Ubuntu Virtual Machine I'm logging into. And I don't want to create spinn
user there.
I need to use shrek
user to log into this remote Ubuntu Virtual Machine.
Where can I specify this user name in VS Code?
EDIT
After applying @LSerni comment advice and @Nikita Kipriyanov answer, my Windows 10 .ssh/config
file looks like this:
Host 172.105.88.119
Hostname 172.105.88.119
Port ????
User shrek
And it works fine.
Host 172.105.88.119
. Also, I am not sure whether HostName is case sensitive and spelled 'Hostname'.