Uploading SSH Key to new Disk


When creating a new Metworx disk, uploading your SSH key is imperative to stay connected to different systems such as SVN, GHE and VSCode.

Uploading SSH key

In your Metworx dashboard:

  1. Launch RStudio and go to existing seesion or create new session.
  2. On the RStudio interface, click More within the file viewer pane. Then click Show Hidden Files.

upload ssh disk 1

  1. Double click .ssh folder.

upload ssh disk 2

  1. Select id_rsa and id_rsa.pub files then click Delete.

upload ssh disk 3

  1. Click Upload.

upload ssh disk 4

  1. Click Choose File then go to your user folder.

upload ssh disk 5

  1. Press Command + shift + . on your keyboard to reveal hidden folders.
  2. Double click .ssh folder then select id_rsa file. Then click Open.

upload ssh disk 6 upload ssh disk 7

  1. Click OK to upload the file.

upload ssh disk 8

  1. Repeat the above steps to upload id_rsa.pub file.
  2. Go to Terminal pane in RStudio interface then navigate to .ssh folder by typing following command.
cd ~/.ssh
  1. Append id_rsa.pub to authorized_keys file.
cat id_rsa.pub >> authorized_keys
  1. To change file permissions, type following commands.
chmod 400 id_rsa*
  1. In the Terminal Pane and type following commands, replace yourSVNusername with your user name and replace FullyQualifiedDomainName with servername. If you don't know your user name and/or servername, please open a ticket here.
cat << EOF > config
Host mc1
     Hostname     FullyQualifiedDomainName
     User         yourSVNusername
     Identityfile ~/.ssh/id_rsa

upload ssh disk 12

Alternatively, If your metworx blueprint is later than 22.09.0, you can use below optional steps.

  • Optional 1. In the file pane, click New Blank File then click Text File.
    upload ssh disk 9
  • Optional 2. Type config then click OK.
    upload ssh disk 10
  • Optional 3. In the text editor enter the content from Step 14. upload ssh disk 11
  1. Verify by SSH into MC1. Replace FullyQualifiedDomainName with the servername.
ssh FullyQualifiedDomainName
  1. Type yes to establish fingerrping.
The authenticity of host 'name of the server and IP' can't be established.
ECDSA key fingerprint is ------------------------------------------------.
Are you sure you want to continue connecting (yes/no)? yes
  1. If successful, expect output such as below.
Welcome to Ubuntu 20.04.4 LTS (GNU/Linux 5.15.0-1015-aws x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Fri Dec  2 20:48:12 UTC 2022

  System load:  0.0               Processes:             112
  Usage of /:   62.0% of 7.68GB   Users logged in:       0
  Memory usage: 7%                IPv4 address for ens5: 
  Swap usage:   0%

 * Ubuntu Pro delivers the most comprehensive open source security and
   compliance features.


96 updates can be applied immediately.
72 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable

New release '22.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

Please submit a ticket for any questions or issues.