Hi,
I try to remotely connect to my VPS server, Ubuntu 22.04, using VScode.
As far as I understood it, I need to paste in the correct details in the .ssh\config file:
Host (can be any name)
HostName (ip adress)
IdentityFile (route to .pem file on computer)
User (username)
& eventually Port (portvalue)
Is the port for SSH connection the default 8083 one? // (I guess this VScode connection does not demand FTP port, right?)
When it comes to username for ex. I don’t know what to use.
The user I created in hestiacp, under which I run the website?
Or is it simply ‘Ubuntu’, as shown in many examples connecting to a Ubuntu vps?
linkp
2
What shows grep ssh /etc/services
?
That is the default SSH port. TCP 8083 is the default HestiaCP web UI port.
1 Like
Alright, thanks.
Worked out.
User is ‘ubuntu’ in this case.
But unfortunately, the home/User folder is completely empty.
Is there a reason for it, that nothing is being shown?
I mean, I would have to navigate to where the website folders are,…
linkp
4
What user owns the site you want to connect to? Does that user have an appropriate shell assigned?
Use the extension SFTP by Natizyskunk
On the root of the project create a folder .vscode with the file sftp.json with the following content:
{
“host”: “servername”,
“protocol”: “sftp”,
“port”: 22,
“username”: “username”,
“passphrase”: “sshkey_passphrase”,
“privateKeyPath”: “/path/to/sshkey/.ssh/id_rsa”,
“remotePath”: “/web/domain.tld/public_html”,
“uploadOnSave”: true,
“useTempFile”: false,
“openSsh”: false
}
Then close and reopen VSCode to load the sftp.json
Every time you save a file it auto saves to the server. If you do not want auto save, just set uploadOnSave to false.
You can also right click on any file and select upload to send it to the server
2 Likes
linkp
6
Hopefully that configuration also works without an SSH key passphrase variable assigned as long as the corresponding key is unlocked in the ssh-agent.
Ok, thanks.
I think I go the more traditional way, simply switch nologin to bash in the user settings of the user, I want to log in with.
I SSH’d in with ‘ubuntu’ as user, thus no website folders were shown to me.
1 Like