I don't have authorized_keys file in my .ssh folder

1.9k views Asked by At

i installed ssh apt install open ssh-server then i type ssh-keygen -t rsa the i type Cd .ssh this directory has the public and private keys but don't have the authorized_keys file. i went to the /etc/ssh/sshd_config file and set the path to authorized_keys, then restart ssh, but still the file is not showing.

for this reason it is not enabling other machine to make an ssh connection with my machine using keys.

1

There are 1 answers

1
Gonzalo Matheu On

You can create by file from the remote host by executing ssh-copy-id username@your-host.

Alternatively, if you know the public keys, you can manually create the file.