-1

With the valid password, we are unable to execute sudo commands from the ssh agent. We are getting "Sorry, try again". The same password works in the server.

What could be the problem?

Zanna
  • 70,465
  • 2
    "Sorry, try again" means the password is incorrect. Mostly you have special chars in it and using a different keyboard? Type it out in a text editor and copy/paste it. If that works you need to switch keyboard layouts – Rinzwind Feb 09 '24 at 17:21
  • What do you mean "from the ssh agent", which should be running on the client and not the server? Also, if you know the command you wish to allow, https://askubuntu.com/q/1108782/1004020 . More unsafe but will surely work is https://askubuntu.com/q/147241/1004020 – Daniel T Feb 09 '24 at 18:28

1 Answers1

2

According to a comment by Rinzwind,

"Sorry, try again" means the password is incorrect.

This is probably because the password contains special characters and a different keyboard layout is being used in the two different contexts you describe. Since the password doesn't show as you are typing, you can't be sure what characters are actually being produced. As Rinzwind says,

Type it out in a text editor and copy/paste it. If that works you need to switch keyboard layouts.

Zanna
  • 70,465