Windows users are recommended to use Git for Windows Installer to follow through these instructions.
One of the secure ways to log in to the remote systems running an ssh server is by generating a public and private ssh key pair.
Check for existing SSH keys and filenames since existing SSH keys are overwritten:
USERNAME@MACHINENAME:~$ ls -la ~/.ssh/
USERNAME@MACHINENAME:~$ ssh-keygen -a 100 -f ~/.ssh/id_ed25519 -t ed25519
For security reasons, the terminal will not appear to type your password.
Now, look inside your ~/.ssh
again and you’ll see two keys appear.
~/.ssh/id_ed25519
- private key - remember to not share it with anyone~/.ssh/id_ed25519.pub
- public key - shareableRun agent in the background:
USERNAME@MACHINENAME:~$ eval $(ssh-agent)
Confirm if the Agent is running:
USERNAME@MACHINENAME:~$ ssh-add -l
Add your SSH Keys to the Agent:
USERNAME@MACHINENAME:~$ ssh-add ~/.ssh/id_ed25519
Enter passphrase for .ssh/id_ed25519:
Identity added: .ssh/id_ed25519
Upload your SSH public key to the remote HPC system:
USERNAME@MACHINENAME:~$ ssh-copy-id RAAPOI_USERNAME@raapoi.vuw.ac.nz
Now, try to log in to the cluster:
USERNAME@MACHINENAME:~$ ssh RAAPOI_USERNAME@raapoi.vuw.ac.nz