Uploading SSH Key to new Disk
Scope
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:
- Launch RStudio and go to existing seesion or create new session.
- On the RStudio interface, click More within the file viewer pane. Then click Show Hidden Files.
- Double click
.ssh
folder.
- Select
id_rsa
andid_rsa.pub
files then click Delete.
- Click Upload.
- Click Choose File then go to your user folder.
- Press
Command + shift + .
on your keyboard to reveal hidden folders. - Double click
.ssh
folder then selectid_rsa
file. Then click Open.
- Click OK to upload the file.
- Repeat the above steps to upload
id_rsa.pub
file. - Go to Terminal pane in RStudio interface then navigate to
.ssh
folder by typing following command.
cd ~/.ssh
- Append
id_rsa.pub
toauthorized_keys
file.
cat id_rsa.pub >> authorized_keys
- To change file permissions, type following commands.
chmod 400 id_rsa*
- 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
EOF
Alternatively, If your metworx blueprint is later than 22.09.0, you can use below optional steps.
- Verify by SSH into MC1. Replace FullyQualifiedDomainName with the servername.
ssh FullyQualifiedDomainName
- 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
- 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.
https://ubuntu.com/aws/pro
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.