how to save ssh keygen How to add ssh keys to a specific user in linux? 1

how to save ssh keygen How to add ssh keys to a specific user in linux?

ssh-keygen (press enter / do not enter any passwords)

ssh-keyscan hpc.university.edu > known_hosts (press enter)

ssh-copy-id yourname@hpc.university.edu ( press Enter) you might need some password to go through university VPN in this case , you can enter them )

Here is what the above code is Doing:
1. ssh-keygen: This command generates a public and private key pair. The public key is stored in ~/.ssh/id_rsa.pub and the private key is stored in ~/.ssh/id_rsa.
2. ssh-keyscan hpc.university.edu > known_hosts: This command adds the public key of the HPC to the known_hosts file.
3. ssh-copy-id yourname@hpc.university.edu: This command copies the public key to the HPC.

Similar Posts