21 January,2020 by Rambler
Question: When I type in cat ~/.ssh/authorized_keys to a RHEL 7 server I get the following message:
cat: /root/.ssh/authorized_keys: No such file or directory
I'm going through the process of setting up a SSH to create a connection between BART and client Potgresql servers - to backup Postgresql databases. How can I fix this issue?
Answer:You need to create the ssh directory for the first time and create the authorized keys file.
Create the .ssh
directory. First check if actually already exists
mkdir ~/.ssh
Set the right permissions for the new .ssh directory. Very important step
chmod 700 ~/.ssh
Create the authorized_keys
file (where the keys will be added)
touch ~/.ssh/authorized_keys
Set the right permissions:
chmod 600 ~/.ssh/authorized_keys
The access to the authorized keys won't work - if the right permissions are not set.
Once you've completed these steps you can add the public keys
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |