0

I added the SSH new port number to the sshd_config file:

Port 50000

After that, I restarted the service with

systemctl restart sshd

When I try to connect with the port number I added, I need to connect with the key, but I get this error:

Server refused public-key signature despite accepting key

... and it asks for the password.

I also have to try to connect as something other than root.

The things I've tried are

  • Updating putty and pageant.

  • Changing the permissions on in the ~/.ssh directory and authorized_key file to 700/600.

How do I fix this?

2
  • Check the output of ssh -vv (you'll need to port your keys to work in ssh rather than putty) and the logs on the server. Commented Jan 4, 2024 at 10:36
  • The error was caused by a conflict with the port being used by the app. Commented Jan 5, 2024 at 1:05

1 Answer 1

-1

You may need to regenerate your public/private key pair and update the config on server and client. As the port is actually the part of the URI, the change of port number is probably be the reason why the signature gets rejected. Make sure to remove the previous key pair in the process.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.