This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
services:2fa:sshkeys [2021/03/22 11:16] – deul | services:2fa:sshkeys [2021/03/22 14:37] (current) – [From Windows] deul | ||
---|---|---|---|
Line 4: | Line 4: | ||
- To login between computers at the Observatory | - To login between computers at the Observatory | ||
- | Below we deal with these two cases. | + | Below we deal with these two cases. Please note that when you setup a private/ |
=====Login from outside the Observatory===== | =====Login from outside the Observatory===== | ||
- | Login from the internet is usually done from your own personal computer. Of course that is a MacBook, but for all those 'other system' | + | Login from the internet is usually done from your own personal computer. Of course that is a MacBook, but for all those 'other system' |
====From Windows==== | ====From Windows==== | ||
- | For Windows, you can use '' | + | For Windows, you can use '' |
- | * [[: | + | * [[: |
- | * [[: | + | * [[: |
* [[: | * [[: | ||
====From MacOS==== | ====From MacOS==== | ||
+ | * [[: | ||
====From Linux==== | ====From Linux==== | ||
- | setup ssh for key based login | + | * [[: |
- | We need to create a private/ | ||
+ | =====Ssh key based login between computers at the Observatory===== | ||
+ | To setup an ssh key pair to allow you to login password/ | ||
$ ssh-keygen -t ecdsa | $ ssh-keygen -t ecdsa | ||
Generating public/ | Generating public/ | ||
Line 28: | Line 30: | ||
Your public key has been saved in / | Your public key has been saved in / | ||
The key fingerprint is: | The key fingerprint is: | ||
- | SHA256: | + | SHA256: |
The key's randomart image is: | The key's randomart image is: | ||
+---[ECDSA 256]---+ | +---[ECDSA 256]---+ | ||
Line 42: | Line 44: | ||
+----[SHA256]-----+ | +----[SHA256]-----+ | ||
- | For both question about passphrase, just hit enter (we will not be using passphrases). This will also have generated two files in your personal | + | and then add the public key to your '' |
+ | cat ~/.ssh/ | ||
- | $ ls -ltr id_ecdsa* | + | From this point on login into Observatory Lunix computers |
- | -rw------- 1 testuser1 users 537 Mar 22 12:13 id_ecdsa | + | |
- | -rw-r--r-- 1 testuser1 users 195 Mar 22 12:13 id_ecdsa.pub | + | |
- | + | ||
- | The file id_rsa.pub must be transferred to the remote host. For this we can use ssh-copy-id: | + | |
- | + | ||
- | $ ssh-copy-id -i ~/ | + | |
- | + | ||
- | This may produce the following message: | + | |
- | + | ||
- | / | + | |
- | The authenticity of host ' | + | |
- | ECDSA key fingerprint is SHA256: | + | |
- | Are you sure you want to continue connecting (yes/no)? yes | + | |
- | + | ||
- | Having confirmed the access key to remote-host, | + | |
- | + | ||
- | / | + | |
- | / | + | |
- | username@remote-host' | + | |
- | + | ||
- | Type your password to actually start the file copy. | + | |
- | + | ||
- | Number of key(s) added: 1 | + | |
- | + | ||
- | Now try logging | + | |
- | and check to make sure that only the key(s) you wanted were added. | + | |
- | + | ||
- | + | ||
- | =====Login between | + |