Skip to content

Setup SSH Keys

To be able to gain remote access to the Skynet.

$USERNAME Refers to your Skynet username, for example I would replace $USERNAME with silver

Create Key

First we set up the ssh folder and create a skynet folder within it for neatness

mkdir -f -p ~/.ssh/skynet
cd ~/.ssh/skynet

Now we will create the ssh key itself.
Location: $USERNAME, your skynet username.
Password: Press Enter twice for no password on the key.

ssh-keygen -t ed25519 -C "<comment>"

It will create two files: $USERNAME and $USERNAME.pub inside ~/.ssh/skynet

Linux Only

Openssh will complain if the keys permissions are too permissive.
To fix this use

chmod 600 $USERNAME
# or
chmod 600 ~/.ssh/skynet/$USERNAME

Create Config

Above we created a folder for Skynet keys.
Ye can do the same with Gitlab/Github/... in the future.
The only downside is that we now have to tell ssh what key to use in what situation.

Back up to the .ssh folder.

cd ../
# or
cd ~/.ssh

Now we have to create the config file.
Notice how it has no extension.

Windows

"" > config

Open it up in any text editor available to you.

Linux

touch config

You can edit it from command line using nano

nano config

Or open up in a text editor.

Windows/Linux

This is what we want to have in teh file.

Host *.skynet.ie
   User $USERNAME
   IdentityFile ~/.ssh/skynet/$USERNAME
   IdentitiesOnly yes

Add key to account

Go to the modify SSH page and paste in teh contents of $USERNAME.pub.

You will now be able to SSH into Skynet like so:

ssh $USERNAME@skynet.skynet.ie