LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Debian Lenny unable to log in over SSH or straight to the server (https://www.linuxquestions.org/questions/linux-newbie-8/debian-lenny-unable-to-log-in-over-ssh-or-straight-to-the-server-794413/)

qwerewq 03-10-2010 06:07 AM

Debian Lenny unable to log in over SSH or straight to the server
 
Hello, how are you?
I have installed Debian lenny with software RAID0 (i think it makes no sence to my problem but maybe...)

I have installed apache2+php+MySQL (everything worked)
I have installed proftpd (to enable users to put files over FTP)

after this i tried to connect over SSH to my server i have got:
Code:

$ ssh -l shark 192.168.0.254 -v
OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.0.254 [192.168.0.254] port 22.
debug1: Connection established.
debug1: identity file /home/shark/.ssh/identity type -1
debug1: identity file /home/shark/.ssh/id_rsa type -1
debug1: identity file /home/shark/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5
debug1: match: OpenSSH_5.1p1 Debian-5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc 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
debug1: Host '192.168.0.254' is known and matches the RSA host key.
debug1: Found key in /home/shark/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/shark/.ssh/identity
debug1: Trying private key: /home/shark/.ssh/id_rsa
debug1: Trying private key: /home/shark/.ssh/id_dsa
debug1: Next authentication method: password
shark@192.168.0.254's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
shark@192.168.0.254's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
shark@192.168.0.254's password:
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).

I thought it is problem with SSH i have tried to connect with another machine over putty, but no success...

then i have removed ~/.ssh dir and tried to connect again... i got the same error. Then i connected keybord and monitor to my Linux box, tried to connect there... no success... neither root or my regular user shark.

but i should mention my FTP users who have shell:
/bin/ftp (symlink to /bin/false) log into the system and then automatically disconnect...

ok, i have tried to boot my linux box to debian safe mode...
it asked for a root pass... after i provided correct root pass it didn't fit.

what to do?
I remember once i have made my linux boot to init 1 without asking to provide a pass (it was mandriva Free 2005 or 2006.0) how to do it with a debian machine using grub or any other fixing possibilities?

P.S. i can not how provide server side /var/log/syslog or any other info because i cannot log into my Linux "server"

thanks for reading and your reply
Quote:

Originally Posted by qwerewq (Post 3901457)
thanx, problem is solved, i have booted with grub, but it was unsuccessful...
then i have booted rescue mod and changed pass... and it helped.


Web31337 03-10-2010 06:27 AM

are you sure you remember actual passwords? try changing them either from init level 1 or by booting from livecd and chroot'ing. Debian's grub config must have single-user level available by default. Mine debian lenny had that after install, 'course I removed it later, so i have no config for that now. I think googling can be a solution.

jamescondron 03-10-2010 02:38 PM

Password is incorrect, thats all.

worm5252 03-10-2010 03:32 PM

Try booting from a Debian Install CD. At the main menu select Advanced options, then select Rescue Mode. From there you you can execute a shell. Once you get to your shell try running passwd and reset the root password. The reboot normally and see if you can login as root. If so that can get you at least into the machine to see what is happening.

jamescondron 03-10-2010 03:47 PM

You can do the same with booting the single user mode, as Web37337 said, or with init=/bin/sh- booting from the CD is the slow way ;)

qwerewq 03-11-2010 04:43 AM

Quote:

Originally Posted by jamescondron (Post 3893391)
You can do the same with booting the single user mode, as Web37337 said, or with init=/bin/sh- booting from the CD is the slow way ;)

when i boot to a safe mode, it asks for root pass or asks me to press Control+D to exit.

Quote:

Originally Posted by jamescondron (Post 3893310)
Password is incorrect, thats all.

it is correct :) pass is too lame to be forgotten :)

jamescondron 03-11-2010 05:17 AM

I'll show you, when I do the same thing, but bodge the password, it does exactly the same:

Code:

jc@jcmain:~$ ssh -v jc@192.168.1.8
OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.1.8 [192.168.1.8] port 22.
debug1: Connection established.
debug1: identity file /home/jc/.ssh/identity type -1
debug1: identity file /home/jc/.ssh/id_rsa type -1
debug1: identity file /home/jc/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5
debug1: match: OpenSSH_5.1p1 Debian-5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc 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
debug1: Host '192.168.1.8' is known and matches the RSA host key.
debug1: Found key in /home/jc/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/jc/.ssh/identity
debug1: Trying private key: /home/jc/.ssh/id_rsa
debug1: Trying private key: /home/jc/.ssh/id_dsa
debug1: Next authentication method: password
jc@192.168.1.8's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
jc@192.168.1.8's password:
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
jc@192.168.1.8's password:
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password).

When it puts you into Single Mode, what happens if you hit Ctrl+D? Certainly when it does that with an error at boot the password drops you into a shell to repair it and then back into the boot process.

Did you try changing init=/bin/bash at the GRUB command? If I remember correctly, when the grub menu comes up you just highlight the entry and hit 'e'

qwerewq 03-11-2010 09:41 AM

Quote:

Originally Posted by jamescondron (Post 3894023)
I'll show you, when I do the same thing, but bodge the password, it does exactly the same:

Code:

<...>
When it puts you into Single Mode, what happens if you hit Ctrl+D? Certainly when it does that with an error at boot the password drops you into a shell to repair it and then back into the boot process.

Did you try changing init=/bin/bash at the GRUB command? If I remember correctly, when the grub menu comes up you just highlight the entry and hit 'e'

i have one question, is it possible that there is something wrong with pam module? because HDD's are very old... and they may contain some bad sectors, might it be that some info was written into it? but it just my thoughts...

i cant do this at the moment, because we have 4 days off and have no key to get to the server :) so i will tell my success story or fail story on Monday. thanks for your help and advices.

jamescondron 03-11-2010 09:45 AM

Lets check some things first before we start messing about with PAM modules. The account on the server is definitely 'shark'? I know you said the password is too lame to forget, but you're totally sure?

Can you login any other way? Do other accounts allow you to log in correctly on there? Can you login locally?

Remember Occam's razor, the simplest answer is usually the correct; couple that with the output of mine when I purposefully give a wrong password, and that tends to suggest the account is wrong, or the password.

qwerewq 03-11-2010 04:03 PM

Quote:

Originally Posted by jamescondron (Post 3894321)
Lets check some things first before we start messing about with PAM modules. The account on the server is definitely 'shark'? I know you said the password is too lame to forget, but you're totally sure?

yes, i have standard user and standard pass for local servers... its: shark:pass :) i have tried all other my passwords after you mentioned ;)

Quote:

Originally Posted by jamescondron (Post 3894321)
Can you login any other way? Do other accounts allow you to log in correctly on there? Can you login locally?

As i mentioned above i have tried to login over SSH and then straight to that server over PS/2 :) other users with shell ( /bin/ftp -> /bin/false ) with different pass, login successful, but it disconnects.

I will log into server using grub and then i will paste sshd log.

qwerewq 03-17-2010 03:18 AM

thanx, problem is solved, i have booted with grub, but it was unsuccessful...
then i have booted rescue mod and changed pass... and it helped.


All times are GMT -5. The time now is 01:58 PM.