Setting up SSH - UTMediaCAT/mediacat-docs GitHub Wiki
Generating SSH keypair
Windows
- Go to this site https://8gwifi.org/sshfunctions.jsp
- For passphrase enter a password (you need to remember this)
- Choose RSA key size 1024
- Click
Generate SSH keys
- You can either email the keys to yourself
- or copy paste the private key and save it to a file on your computer, same with public key
- In the end you should have one file containing the private key and one file containing the public key (make sure you save them in a safe spot)
Linux and mac
- use command
ssh-keygen
and follow instructions - https://docs.oracle.com/cd/E19683-01/806-4078/6jd6cjru7/index.html
- run
ls ~/.ssh/
you should seeid_rsa.pub
key there
Adding public key to server
-
Provide your public key (id_rsa.pub) to the person who has ssh access to the server ( we'll call this person admin)
-
Ask admin to run the following commands
scp [path to id_rsa.pub] [email protected]:/tmp/id_rsa.pub
scp transfers the id_rsa.pub on admin's local machine to the desired server
cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys
>>
appends the contents of/tmp/id_rsa.pub
to~/.ssh/authorized_keys
.If you overwrite this file no one will have access to the server, so be careful.