SSH: Permission denied, please try again. While tryng to connect to remote 12.04 server
I'm not sure exactly what is going on but you should try changing the password using the console. Open a VNC session and open a console. Then enter:
passwd
You will then be prompted for a new password. Enter a good password and then confirm it. Now restart the server and see if the password sticks. Like I said, you should disable root login to your ssh server. If you want to change the root password, then login to your root account and use the passwd
command. If you forgot your root password, then enter:
sudo passwd
This will set the password for the root user. See if that helps your situation.
Related videos on Youtube
user3482705
Updated on September 18, 2022Comments
-
user3482705 over 1 year
I'm having quite the head ache because of this.
The day before yesterday I rented a VPS at atlantic. They provided me with vnc and root's ssh credentials.
I could only login through a VNC viewer applet they've in their control panel website. But whenever I tried to connect using ssh with the credential they provided for root user. I kept getting a horrible
Permission denied, please try again
. Ok, no problem, I kindda remembered something about root account being disabled in Ubuntu (although why I could log using root credentials using the host's VNC, I prefered think about it as a universal mistery), so I logged using vnc, and changed root password. Tried again to ssh it using my new password and... success.That same night a colleague needed an ssh, so I created the user (yes, through add user). He had the same faith.
Permission denied, please try again
all over again. No problem, I logged through VNC using his account (success) and changed password. Tried again to ssh using the new user's password and... success!It was a good night.
Next day (today) I tried to ssh. No luck. Server kept greeting me with
Permission denied, please try again.
"Oh it's that again". Well, I tried the procedure that served so well yesterday. Changing password. This time, with no luck.
Through the day I've been able to follow a couple of troubleshooting guide from ask ubuntu. No luck. I just keep getting the same error.
I'm not very good using the command line so, I just don't know how could I post my sshd_config while only connecting through a VNC applet (!!!), but I can tell you I did nothing to it but uncomment the lines
ListenAddress :: ListenAddress 0.0.0.0
That's it.
Having not tried being a sysadmin ever before, I'm kindda lost here. I can't even explain myself why would it let me in one day, and the next day deny me access again.
I may be losing something obvious, can someone help me?
Update
Ok, so just because why not, I kept trying sshing and changing password. It happened again! After A LOT of tries, after I changed the password for nth time, it worked again. Any ideas?
Update 2
After a couple of minutes of having sshed, the terminal displayed "Write failed: Broken pipe" before showing my usual local shell prompt.
Is this any clue about what's happening?
-
user3482705 over 10 yearsThat's what I tried, but the other user account suffers from the same problem. I think I'm not really good at explaining myself,
-
John over 10 yearsYou should try connecting with a key instead of using password logins
-
user3482705 over 10 yearsDo you know any article/blog post where they guide me on how to do it and explain me what is happening behind the curtains? I like knowing what I am doing (I'm a programmer and really don't need a "for dummies" guide, I really want to lear :)
-
John over 10 yearsThis is a GREAT tutorial on SSH Keys: wiki.archlinux.org/index.php/SSH_Keys
-
quimnuss about 7 yearsWhat does
tail -f /var/log/auth.log
say when you try to ssh? -
mckenzm almost 6 yearsdid we ever see an sshd_config for this, "PasswordAuthentication yes" confirmed ?
-
-
user3482705 over 10 yearsProbably I wasn't clear, but I did it and worked a couple of times, but not the other 100 times I tried.