SSH Connection
Once you run a workspace, you can fully leverage the development environment using SSH.

1. Create SSH Key

To enable SSH connection, you first need a SSH key pair. Once you obtained a public key for your account and workspace instance, you can connect it with a private key.
1
$ ssh-keygen -t ed25519 -C "vessl-floyd"
2
Generating public/private ed25519 key pair.
3
Enter file in which to save the key (/Users/floyd/.ssh/id_ed25519):
4
Enter passphrase (empty for no passphrase):
5
Enter same passphrase again:
6
Your identification has been saved in /Users/floyd/.ssh/id_ed25519.
7
Your public key has been saved in /Users/floyd/.ssh/id_ed25519.pub.
8
The key fingerprint is:
9
SHA256:78yjMGcJoV73v/jkLHIRhdC0wL0FBL6c68T0MZGoV2Q savvihub-floyd
10
The key's randomart image is:
11
+--[ED25519 256]--+
12
| .+BEo |
13
| ..=+oo |
14
| . o =+ |
15
| . + +o. |
16
| . + S o. |
17
| . . * *.o |
18
| . o B +.. |
19
| B.++* |
20
| o+=+*. |
21
+----[SHA256]-----+
Copied!

2. Add SSH public key to your VESSL account

You can add your SSH public key to your account using VESSL CLI. The added keys will be injected to every running workspaces you created. You can manage your keys with vessl ssh-key list and vessl ssh-key delete commands.
1
$ vessl ssh-key add
2
[?] SSH public key path: /Users/floyd/.ssh/id_ed25519.pub
3
[?] SSH public key name: vessl-floyd
4
​
5
Successfully added.
Copied!

3. Connect via CLI

If there are more than one running workspaces, you will be asked to select one to connect.
1
$ vessl workspace ssh
2
The authenticity of host '[tcp.apne2-prod1-cluster.savvihub.com]:30787 ([52.78.240.117]:30787)' can't be established.
3
ECDSA key fingerprint is SHA256:iSexO7W1U14P3Pp6wRfPleHABQQMek/JAgb5kHqg5Jw.
4
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
5
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.14.238-182.422.amzn2.x86_64 x86_64)
6
​
7
* Documentation: https://help.ubuntu.com
8
* Management: https://landscape.canonical.com
9
* Support: https://ubuntu.com/advantage
10
This system has been minimized by removing packages and content that are
11
not required on a system that users do not log into.
12
​
13
To restore this content, you can run the 'unminimize' command.
14
​
15
The programs included with the Ubuntu system are free software;
16
the exact distribution terms for each program are described in the
17
individual files in /usr/share/doc/*/copyright.
18
​
19
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
20
applicable law.
21
​
Copied!

4. Setup VSCode Remote-SSH plugin config

You can also add your workspace to VSCode Remote-SSH plugin config. vessl workspace vscode adds the information to ~/.ssh/config so that the workspace can show up in the host list.
1
$ vessl workspace vscode
2
Successfully updated /Users/floyd/.ssh/config
3
​
4
$ cat ~/.ssh/config
5
Host acceptable-bite-1627438220
6
User vessl
7
Hostname tcp.apne2-prod1-cluster.savvihub.com
8
Port 30787
9
StrictHostKeyChecking accept-new
10
CheckHostIP no
11
IdentityFile /Users/floyd/.ssh/id_ed25519
Copied!

5. Manual Access

You can integrate with other IDEs and make SSH connection without VESSL CLI using the host, username, and port information. In this case, the host is tcp.apne2-prod1-cluster.savvihub.com, username vessl, and port 30787. The full SSH command is ssh -p 30787 -i ~/.ssh/id_ed25519 [email protected].