Operating System - Linux
1748003 Members
4456 Online
108757 Solutions
New Discussion юеВ

Re: ordinary users unable to login on the SSH server

 
Maxim Revutskiy
Valued Contributor

Re: ordinary users unable to login on the SSH server

and also try to
# /usr/sbin/sshd -p 2022 -ddd
and connect with
ssh hostname -p 2022 -vvv
Maaz
Valued Contributor

Re: ordinary users unable to login on the SSH server

on server
# /usr/sbin/sshd -p 2022 -ddd
output attached

on client side
# ssh bilal@192.168.0.1 -p 2022 -vvv
OpenSSH_4.2p1, OpenSSL 0.9.8a 11 Oct 2005
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.0.1 [192.168.0.1] port 2022.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.2
debug1: match: OpenSSH_4.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
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
debug2: dh_gen_key: priv key bits set: 131/256
debug2: bits set: 517/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 1
debug1: Host '192.168.0.1' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug2: bits set: 535/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /root/.ssh/identity ((nil))
debug2: key: /root/.ssh/id_rsa ((nil))
debug2: key: /root/.ssh/id_dsa ((nil))
debug1: Authentications that can continue: publickey,keyboard-interactive
debug3: start over, passed a different list publickey,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug3: no such identity: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug3: no such identity: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug3: no such identity: /root/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
debug3: userauth_kbdint: disable: no info_req_seen
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).
nano:~ # scp 192.168.0.1:/root/file.txt .
ssh: connect to host 192.168.0.1 port 22: Connection refused
Maaz
Valued Contributor

Re: ordinary users unable to login on the SSH server

please ignore the last two lines in output of
# ssh bilal@192.168.0.1 -p 2022 -vvv

the last two lines are(ignore these 2 lines):
nano:~ # scp 192.168.0.1:/root/file.txt .
ssh: connect to host 192.168.0.1 port 22: Connection refused
Maaz
Valued Contributor

Re: ordinary users unable to login on the SSH server

> Can you provide output of ls -l /dev/tty* ?

# ls -l /dev/tty*
crw-rw-rw- 1 root tty 5, 0 Sep 13 08:24 /dev/tty
crw--w---- 1 root root 4, 0 Sep 13 07:02 /dev/tty0
crw-rw---- 1 root tty 4, 1 Sep 13 07:00 /dev/tty1
crw--w---- 1 root tty 4, 10 Sep 13 08:41 /dev/tty10
crw--w---- 1 root tty 4, 11 Sep 13 07:02 /dev/tty11
crw--w---- 1 root tty 4, 12 Sep 13 07:02 /dev/tty12
crw--w---- 1 root tty 4, 13 Sep 13 07:02 /dev/tty13
crw--w---- 1 root tty 4, 14 Sep 13 07:02 /dev/tty14
crw--w---- 1 root tty 4, 15 Sep 13 07:02 /dev/tty15
crw--w---- 1 root tty 4, 16 Sep 13 07:02 /dev/tty16
crw--w---- 1 root tty 4, 17 Sep 13 07:02 /dev/tty17
crw--w---- 1 root tty 4, 18 Sep 13 07:02 /dev/tty18
crw--w---- 1 root tty 4, 19 Sep 13 07:02 /dev/tty19
crw-rw---- 1 root tty 4, 2 Sep 13 07:00 /dev/tty2
crw--w---- 1 root tty 4, 20 Sep 13 07:02 /dev/tty20
crw--w---- 1 root tty 4, 21 Sep 13 07:02 /dev/tty21
crw--w---- 1 root tty 4, 22 Sep 13 07:02 /dev/tty22
crw--w---- 1 root tty 4, 23 Sep 13 07:02 /dev/tty23
crw--w---- 1 root tty 4, 24 Sep 13 07:02 /dev/tty24
crw--w---- 1 root tty 4, 25 Sep 13 07:02 /dev/tty25
crw--w---- 1 root tty 4, 26 Sep 13 07:02 /dev/tty26
crw--w---- 1 root tty 4, 27 Sep 13 07:02 /dev/tty27
crw--w---- 1 root tty 4, 28 Sep 13 07:02 /dev/tty28
crw--w---- 1 root tty 4, 29 Sep 13 07:02 /dev/tty29
crw-rw---- 1 root tty 4, 3 Sep 13 07:00 /dev/tty3
crw--w---- 1 root tty 4, 30 Sep 13 07:02 /dev/tty30
crw--w---- 1 root tty 4, 31 Sep 13 07:02 /dev/tty31
crw--w---- 1 root tty 4, 32 Sep 13 07:02 /dev/tty32
crw--w---- 1 root tty 4, 33 Sep 13 07:02 /dev/tty33
crw--w---- 1 root tty 4, 34 Sep 13 07:02 /dev/tty34
crw--w---- 1 root tty 4, 35 Sep 13 07:02 /dev/tty35
crw--w---- 1 root tty 4, 36 Sep 13 07:02 /dev/tty36
crw--w---- 1 root tty 4, 37 Sep 13 07:02 /dev/tty37
crw--w---- 1 root tty 4, 38 Sep 13 07:02 /dev/tty38
crw--w---- 1 root tty 4, 39 Sep 13 07:02 /dev/tty39
crw-rw---- 1 root tty 4, 4 Sep 13 07:00 /dev/tty4
crw--w---- 1 root tty 4, 40 Sep 13 07:02 /dev/tty40
crw--w---- 1 root tty 4, 41 Sep 13 07:02 /dev/tty41
crw--w---- 1 root tty 4, 42 Sep 13 07:02 /dev/tty42
crw--w---- 1 root tty 4, 43 Sep 13 07:02 /dev/tty43
crw--w---- 1 root tty 4, 44 Sep 13 07:02 /dev/tty44
crw--w---- 1 root tty 4, 45 Sep 13 07:02 /dev/tty45
crw--w---- 1 root tty 4, 46 Sep 13 07:02 /dev/tty46
crw--w---- 1 root tty 4, 47 Sep 13 07:02 /dev/tty47
crw--w---- 1 root tty 4, 48 Sep 13 07:02 /dev/tty48
crw--w---- 1 root tty 4, 49 Sep 13 07:02 /dev/tty49
crw-rw---- 1 root tty 4, 5 Sep 13 07:00 /dev/tty5
crw--w---- 1 root tty 4, 50 Sep 13 07:02 /dev/tty50
crw--w---- 1 root tty 4, 51 Sep 13 07:02 /dev/tty51
crw--w---- 1 root tty 4, 52 Sep 13 07:02 /dev/tty52
crw--w---- 1 root tty 4, 53 Sep 13 07:02 /dev/tty53
crw--w---- 1 root tty 4, 54 Sep 13 07:02 /dev/tty54
crw--w---- 1 root tty 4, 55 Sep 13 07:02 /dev/tty55
crw--w---- 1 root tty 4, 56 Sep 13 07:02 /dev/tty56
crw--w---- 1 root tty 4, 57 Sep 13 07:02 /dev/tty57
crw--w---- 1 root tty 4, 58 Sep 13 07:02 /dev/tty58
crw--w---- 1 root tty 4, 59 Sep 13 07:02 /dev/tty59
crw-rw---- 1 root tty 4, 6 Sep 13 07:00 /dev/tty6
crw--w---- 1 root tty 4, 60 Sep 13 07:02 /dev/tty60
crw--w---- 1 root tty 4, 61 Sep 13 07:02 /dev/tty61
crw--w---- 1 root tty 4, 62 Sep 13 07:02 /dev/tty62
crw--w---- 1 root tty 4, 63 Sep 13 07:02 /dev/tty63
crw--w---- 1 root root 4, 7 Sep 13 07:02 /dev/tty7
crw--w---- 1 root tty 4, 8 Sep 13 07:02 /dev/tty8
crw--w---- 1 root tty 4, 9 Sep 13 07:02 /dev/tty9
crw-rw---- 1 root uucp 4, 64 May 4 2007 /dev/ttyS0
crw-rw---- 1 root uucp 4, 65 May 4 2007 /dev/ttyS1
crw-rw---- 1 root uucp 4, 66 May 4 2007 /dev/ttyS2
crw-rw---- 1 root uucp 4, 67 May 4 2007 /dev/ttyS3
crw------- 1 root uucp 4, 68 May 4 2007 /dev/ttyS4
crw------- 1 root uucp 4, 69 May 4 2007 /dev/ttyS5
crw------- 1 root uucp 4, 70 May 4 2007 /dev/ttyS6
crw------- 1 root uucp 4, 71 May 4 2007 /dev/ttyS7
crw-rw-rw- 1 root tty 3, 0 Sep 13 07:02 /dev/ttyp0
crw-rw-rw- 1 root tty 3, 1 Sep 13 07:02 /dev/ttyp1
crw-rw-rw- 1 root tty 3, 2 Sep 13 07:02 /dev/ttyp2
crw-rw-rw- 1 root tty 3, 3 Sep 13 07:02 /dev/ttyp3
crw-rw-rw- 1 root tty 3, 4 Sep 13 07:02 /dev/ttyp4
crw-rw-rw- 1 root tty 3, 5 Sep 13 07:02 /dev/ttyp5
crw-rw-rw- 1 root tty 3, 6 Sep 13 07:02 /dev/ttyp6
crw-rw-rw- 1 root tty 3, 7 Sep 13 07:02 /dev/ttyp7
crw-rw-rw- 1 root tty 3, 8 Sep 13 07:02 /dev/ttyp8
crw-rw-rw- 1 root tty 3, 9 Sep 13 07:02 /dev/ttyp9
crw-rw-rw- 1 root tty 3, 10 Sep 13 07:02 /dev/ttypa
crw-rw-rw- 1 root tty 3, 11 Sep 13 07:02 /dev/ttypb
crw-rw-rw- 1 root tty 3, 12 Sep 13 07:02 /dev/ttypc
crw-rw-rw- 1 root tty 3, 13 Sep 13 07:02 /dev/ttypd
crw-rw-rw- 1 root tty 3, 14 Sep 13 07:02 /dev/ttype
crw-rw-rw- 1 root tty 3, 15 Sep 13 07:02 /dev/ttypf
crw-rw-rw- 1 root tty 3, 16 Sep 13 07:02 /dev/ttyq0
crw-rw-rw- 1 root tty 3, 17 Sep 13 07:02 /dev/ttyq1
crw-rw-rw- 1 root tty 3, 18 Sep 13 07:02 /dev/ttyq2
crw-rw-rw- 1 root tty 3, 19 Sep 13 07:02 /dev/ttyq3
crw-rw-rw- 1 root tty 3, 20 Sep 13 07:02 /dev/ttyq4
crw-rw-rw- 1 root tty 3, 21 Sep 13 07:02 /dev/ttyq5
crw-rw-rw- 1 root tty 3, 22 Sep 13 07:02 /dev/ttyq6
crw-rw-rw- 1 root tty 3, 23 Sep 13 07:02 /dev/ttyq7
crw-rw-rw- 1 root tty 3, 24 Sep 13 07:02 /dev/ttyq8
crw-rw-rw- 1 root tty 3, 25 Sep 13 07:02 /dev/ttyq9
crw-rw-rw- 1 root tty 3, 26 Sep 13 07:02 /dev/ttyqa
crw-rw-rw- 1 root tty 3, 27 Sep 13 07:02 /dev/ttyqb
crw-rw-rw- 1 root tty 3, 28 Sep 13 07:02 /dev/ttyqc
crw-rw-rw- 1 root tty 3, 29 Sep 13 07:02 /dev/ttyqd
crw-rw-rw- 1 root tty 3, 30 Sep 13 07:02 /dev/ttyqe
crw-rw-rw- 1 root tty 3, 31 Sep 13 07:02 /dev/ttyqf
crw-rw-rw- 1 root tty 3, 32 Sep 13 07:02 /dev/ttyr0
crw-rw-rw- 1 root tty 3, 33 Sep 13 07:02 /dev/ttyr1
crw-rw-rw- 1 root tty 3, 34 Sep 13 07:02 /dev/ttyr2
crw-rw-rw- 1 root tty 3, 35 Sep 13 07:02 /dev/ttyr3
crw-rw-rw- 1 root tty 3, 36 Sep 13 07:02 /dev/ttyr4
crw-rw-rw- 1 root tty 3, 37 Sep 13 07:02 /dev/ttyr5
crw-rw-rw- 1 root tty 3, 38 Sep 13 07:02 /dev/ttyr6
crw-rw-rw- 1 root tty 3, 39 Sep 13 07:02 /dev/ttyr7
crw-rw-rw- 1 root tty 3, 40 Sep 13 07:02 /dev/ttyr8
crw-rw-rw- 1 root tty 3, 41 Sep 13 07:02 /dev/ttyr9
crw-rw-rw- 1 root tty 3, 42 Sep 13 07:02 /dev/ttyra
crw-rw-rw- 1 root tty 3, 43 Sep 13 07:02 /dev/ttyrb
crw-rw-rw- 1 root tty 3, 44 Sep 13 07:02 /dev/ttyrc
crw-rw-rw- 1 root tty 3, 45 Sep 13 07:02 /dev/ttyrd
crw-rw-rw- 1 root tty 3, 46 Sep 13 07:02 /dev/ttyre
crw-rw-rw- 1 root tty 3, 47 Sep 13 07:02 /dev/ttyrf
crw-rw-rw- 1 root tty 3, 48 Sep 13 07:02 /dev/ttys0
crw-rw-rw- 1 root tty 3, 49 Sep 13 07:02 /dev/ttys1
crw-rw-rw- 1 root tty 3, 50 Sep 13 07:02 /dev/ttys2
crw-rw-rw- 1 root tty 3, 51 Sep 13 07:02 /dev/ttys3
crw-rw-rw- 1 root tty 3, 52 Sep 13 07:02 /dev/ttys4
crw-rw-rw- 1 root tty 3, 53 Sep 13 07:02 /dev/ttys5
crw-rw-rw- 1 root tty 3, 54 Sep 13 07:02 /dev/ttys6
crw-rw-rw- 1 root tty 3, 55 Sep 13 07:02 /dev/ttys7
crw-rw-rw- 1 root tty 3, 56 Sep 13 07:02 /dev/ttys8
crw-rw-rw- 1 root tty 3, 57 Sep 13 07:02 /dev/ttys9
crw-rw-rw- 1 root tty 3, 58 Sep 13 07:02 /dev/ttysa
crw-rw-rw- 1 root tty 3, 59 Sep 13 07:02 /dev/ttysb
crw-rw-rw- 1 root tty 3, 60 Sep 13 07:02 /dev/ttysc
crw-rw-rw- 1 root tty 3, 61 Sep 13 07:02 /dev/ttysd
crw-rw-rw- 1 root tty 3, 62 Sep 13 07:02 /dev/ttyse
crw-rw-rw- 1 root tty 3, 63 Sep 13 07:02 /dev/ttysf