Install ssh if needed: eg, Ubuntu: https://ubuntu.com/server/docs/service-openssh
On the server: sudo vi /etc/ssh/sshd_config
AllowTcpForwarding yes
PasswordAuthentication no
Change the port if you want to, but leaving it at 22
seemed to fix some issues
Port 2222
Add the contents of the host's public key eg. cat ~/.ssh/id_ed25519.pub
or whatever .pub
file is in ~/.ssh
to a new line in ~/.ssh/authorized_hosts
on the host.
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAp9idF3NBh7SP0giBmglthuLKKLJolffeD5548st3Kv xxx@xxx.com
On Windows, easiest to use wsl's SSH to get around key permissions issues: https://zitseng.com/archives/20325
Configure the extension. For example, pointing IdentityFile
to a path inside WSL
Host 192.168.1.168
HostName 192.168.1.168
IdentityFile ~/.ssh/id_ed25519
Port 2222