2

I ran some usermod command, through SSH, now I can't get back into my Pi by using the line that worked before (ssh [email protected]) because it says 'Permission denied, please try again'. I tried formatting and re-installing the O/S onto the SD Card, but the same exact error is being given, as if I did not format it?

I had installed Apache when it was working fine, (before the format) and it seems that now, after the format, Apache is being started when the device is switched on (I hooked it up to a TV and it says Apache server running or something like that)

Can anyone identify the problem?


So this is what i got entering ssh -v [email protected]:

OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.104 [192.168.0.104] port 22.
debug1: Connection established.
debug1: identity file /Users/xxxxxx/.ssh/id_rsa type -1
debug1: identity file /Users/xxxxxx/.ssh/id_rsa-cert type -1
debug1: identity file /Users/xxxxxx/.ssh/id_dsa type -1
debug1: identity file /Users/xxxxxx/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-3
debug1: match: OpenSSH_6.0p1 Debian-3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
The authenticity of host '192.168.104 (192.168.0.104)' can't be established.
RSA key fingerprint is a1:2b:d7:53:34:dc:89:ef:08:4a:26:c0:03:5b:20:4e.
Are you sure you want to continue connecting (yes/no)?

So I hit Yes, and enter the password, then this comes up:

debug1: Authentications that can continue: publickey,password Permission denied, please try again.

:(


I messed up some root permissions, I'm certain the password is correct but I think it's telling me Access Denied/Permission Failed because of the permissions, but now since I can't login I don't know how I can change them?

As I said earlier, I tried formatting my SD card and re-booting the device, although it seems like I did not even format it as the same permission problems like before are still there. Could it be that I'm not formatting correctly?


Updated:

@Jivings I had the same thoughts, so I tried to access it via my PC using Putty, and it would give me ACCESS DENIED.

7
  • It's not clear to me so please explain - the same problem occurs even after completely rewriting your SD card with fresh, clean installation of the system? Also, if you could add -v option to your ssh command (ssh -v [email protected]) and edit your question to contain full output of this command, it would help to identify the problem. Commented Apr 25, 2013 at 9:58
  • 1
    Thanks for the comment krzysztof. Yes, a complete fresh installation. Altough before the format, when it was working, I installed Apache. And now when I boot up my Pi it seems to start running Apache - if I had a fresh install of the system, how is Apache still there? I will try what you told me when I get back home
    – Nik
    Commented Apr 25, 2013 at 13:22
  • 1
    Unfortunately it seems like you're giving it the wrong password. Or something else is wrong. The only way to find out is to look at the log files on the Pi. But in order to do this, you would first have to log in. Commented Apr 26, 2013 at 6:23
  • I think the permissions you messed up are on your host system. Can you try accessing the Pi from anywhere else?
    – Jivings
    Commented Apr 26, 2013 at 7:38
  • 2
    I'm voting to close this question as off-topic because none of the answers address the actual question (wrong password on a vanilla system), and it's unlikely we will ever know what was the problem back in 2013. Commented Jan 27, 2020 at 9:20

4 Answers 4

11

I had the same issue and in my case it was due to the different keyboard layouts.

Pi uses UK keyboard layout by default. I had entered " character instead of @ when creating the password. Changed the rpi's keyboard layout and the password.

2
  • 2
    thanks! I did not know the PI had the UK layout. Indeed that was the problem for me.
    – phil_w
    Commented Jun 13, 2014 at 0:42
  • 2
    Couldn't leave a comment, but the UK -> US keyboard fix works!
    – TheSashmo
    Commented Jun 29, 2014 at 17:30
0

use [ ssh user_name_or_computer_name@host_ip_address ]

use correct user_name of your system with correct host_ip_address my laptop username is suman and host_ip_address is 192.168.1.4 and I was able to connect enter image description here

0

I had an issue with "Permission denied, please try again." When I changed the to the correct username "ssh [email protected]" I gained access.

1
  • 2
    This is clearly not the problem the OP were having. Commented Jan 27, 2020 at 9:16
-2
  1. you should check permissions of your ~/.ssh directory (should be 0700)
  2. you may try to use ssh host -l user instead of ssh user@host, especially if you login name on the current system is not the same as login on the remote system.
  3. if you have changed your login password before, please, remember it might be reset back to 'raspberry' after you reformat your SD card.
1
  • 4
    user@host is equivalent to host -l user.
    – Lekensteyn
    Commented May 11, 2013 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.