I want scp to be auto-transferred with key authentication.

Asked 2 months ago, Updated 2 months ago, 3 views

Let me ask you a question.
I want to use php for scp, so some of them are automatically transferred with key authentication.
Only certain servers have been asked for passwords and cannot be forwarded automatically.

As far as I can tell, under /home/user_name, ssh-keygen...what's the matter with you, so I'll make it
I manually added the id_rsa.pub public key to /home/user_name/.ssh/authorized_keys, which I want to automatically transfer, and saved it, but they still ask for the password.

Is there something missing?

php linux scp

2022-09-30 14:27

1 Answers

The first thing that comes to mind is the possibility that key authentication is not enabled in the sshd_config setting on the server side.Open the configuration file to see if PubkeyAuthentication yes is enabled.

It might be a good idea to compare the configuration file with a server that can scp without a password.


2022-09-30 14:27

If you have any answers or tips


© 2022 OneMinuteCode. All rights reserved.