Some HPCs such as Argonne’s LCRC machines require SSH keys to get connected. It’s a convinient and safer way to connect after set it up. But it’s a little tricky if you still want to view the remote directories from software like WinSCP on Windows. Here’s a brief guide.
On Mac
Mac is relativly easy. Just follow the instruction to create a public SSH key using OpenSSH and upload it (id_rsa.pub
) to your account then you can log in from terminal or Microsoft Code. The command is
cd ~/.ssh
ssh-keygen -b 4096 -t rsa
On Windows
You can follow the same way above to generate a public SSH key in windows powershell. The generated public key can be used in XShell to get you connected by linking the generated id_rsa
(not the id_rsa.pub
) file. You still need to upload the id_rsa.pub
to your account of course.
For WinSCP it’s a little different. You have to connect through a private key generated by PUTTY. The instruction is here. It’s nice that WinSCP has a built-in PUTTY key generator which will generate a .ppk
file instead of a .pub
file. You will need to upload the OpenSSH style key to the account when it’s generated and use the .ppk
file to login from WinSCP.