Difference between revisions of "Rocky Access SSH"
Line 6: | Line 6: | ||
= Generate Key Pair = | = Generate Key Pair = | ||
[[File:Rocky keygen linuxmac.gif|thumb|SEE IN ACTION]] | |||
Open a terminal and type the following command: | Open a terminal and type the following command: | ||
Line 25: | Line 27: | ||
</pre> | </pre> | ||
= Connecting to Rocky = | = Connecting to Rocky = | ||
Line 48: | Line 47: | ||
= Upload/Download Files = | = Upload/Download Files = | ||
[[File:Rocky copy linuxmac.gif|thumb|See in Action]]< | [[File:Rocky copy linuxmac.gif|thumb|See in Action]] | ||
To copy files from remote systems through SCP we use the scp command. It is very much like the cp command except you can specify remote machines as the source or destination of the file. | |||
<pre> | |||
scp -i <myprivatekeyfile> <from> <to> | |||
</pre> | |||
To specify a remote location, you would use the format | |||
<pre> | |||
<username>@<hostname>:[newfilename] | |||
</pre> | |||
The colon is required. If you leave newfilename blank then it will default to the same filename given in the other parameters. | |||
For example, to copy | |||
[TODO] | [TODO] | ||
= Mounting your Rocky Home = | = Mounting your Rocky Home = | ||
[TODO] | [TODO] |
Revision as of 14:35, 22 June 2022
SSH Software
On Linux or Mac, the OpenSSH command-line utilities are generally installed by default.
While the examples in this document are geared towards unix based systems like Linux or Mac, they can be installed on Windows starting with Windows 10. You can find more information about that [here on Microsoft's website]. Some of the commands in this document will work for Windows but the paths will likely be different.
Generate Key Pair
Open a terminal and type the following command:
ssh-keygen
You will be prompted where to save your private key. Just hitting enter will save it to the default location. You will also be prompted to enter a password. This password will be required to use your private key in the future.
Default Private Key Location | ~/.ssh/id_rsa |
Default Public Key Location | ~/.ssh/id_rsa.pub |
Assuming default location, output your public key with the following command:
cat ~/.ssh/id_rsa.pub
Connecting to Rocky
To connect to a Rocky shell you will use the ssh command on the edge node: rocky.nimbios.org
The format for the ssh command is:
ssh -i <myprivatekeyfile> <username>@<hostname>
If you set a password on your private key, you will be prompted for it.
If your private key file is in the default location, the ssh utilities will know to look there for it making the command just the following:
ssh <username>@<hostname>
Upload/Download Files
To copy files from remote systems through SCP we use the scp command. It is very much like the cp command except you can specify remote machines as the source or destination of the file.
scp -i <myprivatekeyfile> <from> <to>
To specify a remote location, you would use the format
<username>@<hostname>:[newfilename]
The colon is required. If you leave newfilename blank then it will default to the same filename given in the other parameters.
For example, to copy [TODO]
Mounting your Rocky Home
[TODO]