Connect with ssh to server
In vscode add the ssh extension and then add host to the .ssh config file usually found in the user folder
Use the following syntax to add the host to the config file:
Host <name for host in vscone>
HostName <Hostname / ip address>
IdentityFile "<path to ssh key>"
User <username>