0

My VM: Ubuntu 20.04

VPN VM: Ubuntu 18.04

I'm accessing a vm via a vpn using another vm, i got in successfully and now i'm using the built-in Ubuntu file explorer to access the vpn vmfiles using sftp, that works ok. My problem is when I right-click on the file explorer and try to use Open in Remote Terminal it opens a new terminal that says [email protected]'s password: where wrongUser is my vm user and not the vpn vm user, so I can't use it. Thanks!

2

1 Answer 1

0

I don't know what "built-in Ubuntu file explorer" you are using; possibly nautilus. I don't know how you are using it; possibly by opening sftp://xxx.xx.xxx.xxx and supplying the right username and password to a pop-up window.

Specify the right username in the address in the first place:

sftp://[email protected]

Alternatively (or if the above doesn't work in your unspecified file explorer) edit your ~/.ssh/config (on the client, i.e. where nautilus or whatever is about to use SSH; create the file if needed) and specify rightUser as the default user for the xxx.xx.xxx.xxx host:

Host xxx.xx.xxx.xxx
User rightUser

See man 5 ssh_config for details. Now SSH connections to xxx.xx.xxx.xxx with no username explicitly specified will use the rightUser instead of your local username.

1

You must log in to answer this question.

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