I've a problem with SSH public key authentication.
I'm a travel agent and need to give to the client (Amadeus) the access to only one folder on my server located in home directory, ex. xxx so I created SFTP user, ex. yyy, with permissions to access only to this folder.
The client is going to enter this folder and upload files that later will be read by back office of the travel agency.
The client provided me their IP (that I included on my trust IPs) and Public Key. I created on my server .ssh folder with permissions 700 and authorized_keys file with permissions 600 and I copied public key inside.
The client receives this answer when trying to connect:
(SSH key)...[AUTHENTICATION ERROR] Authentication failed.
I don't know where the problem is. Maybe it is necessary to indicate the server from where to read this public key or give the user any additional permissions in relation to .ssh folder.
If you have any idea where can be the problem any comments are appreciated.
PubkeyAuthentication = yes
is present and ifPasswordAuthentication no
is there (note you can have both to yes). By default sshd refers to both .ssh/authorized_keys and .ssh/authorized_keys2 in home folder for ssh keys. – admstg Mar 29 '24 at 14:44