Let's say I have a user on a remote machine called wvxvw
with a password password
. The remote machine runs inside a VirtualBox, it is set to forward ports 22 to 3022. This is my ~/.ssh/config
on the host:
Host ubuntu-server
HostName 127.0.0.1
Port 3022
User wvxvw
I can browse directories on the guest via /ssh:ubuntu-server:
path. wvxvw
is in the sudoers group on the remote machine. Now, let's say I want to edit files that require root permissions on the guest machine. How do I open, say a /etc/default/
directory as root? I've tried couple of options, but that didn't work: /sudo:wvxvw@127.0.0.1:/etc/default
goes back to the host machine. If I specify port, then the address is misinterpreted as something else. So... how do I?