/.ssh/id_*.pub
, as there is no such file or directory.ssh-copy-id
. If the option is available, we recommend using it. Otherwise, try any of the other two noted.id_rsa.pub key
created on the local machine, it will ask you to provide the password for the remote account. Type in the password and hit Enter.~/.ssh/id_rsa.pub
file to the remote server’s ~/.ssh
directory. You can locate it under the name authorized_keys
.~/.ssh
directory as well as the authorized_keys
file:chmod 700
makes the file executable, while chmod 600
allows the user to read and write the file.id_rsa.pub
(the SSH public key) to the previously created authorized_keys
file on the remote CentOS server by typing the command:~/.ssh/id_rsa.pub
file:authorized_keys
Generate pem file from public key mac. file with an editor of your preference. For example, to open it with Nano, type:yes
value to no
. Thus, the directive should be as following:ssh-keygen
utility to create your key. For a 2048 bit RSA key do:/home/your_username/.ssh/id_rsa
on Linux, or/Users/your_username/.ssh/id_rsa
on Mac) if you don’t already have a keyinstalled, or specify a custom location if you are creating a second key (orjust want to for whatever reason).~/.ssh/authorized_keys
(you can specify multiple public keys, one perline).