LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-11-2014, 03:59 AM   #1
ArunkumarRavi
LQ Newbie
 
Registered: Jul 2014
Location: Chennai,Tamilnadu,India
Distribution: Red Hat Linux 7.3 and MontaVista Linux
Posts: 22

Rep: Reputation: Disabled
SSH Login Issue


Hi everyone,
Im trying to enable/start the sftp service in an embedded device for the first time.. But when i try so im getting the error "Received disconnect from 192.168.1.111: 2: Too many attempts." On debugging with command strace sftp -vvv User@IP, below are last few lines of the output i obtained..
Code:
ld_mmap(NULL, 1172984, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40147000
mprotect(0x40255000, 67064, PROT_NONE)  = 0
old_mmap(0x40257000, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x108000) = 0x40257000
old_mmap(0x40262000, 13816, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40262000
close(3)                                = 0
open("v5l/fast-mult/half/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("v5l/fast-mult/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("v5l/half/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("v5l/libcrypt.so.1", O_RDONLY)     = -1 ENOENT (No such file or directory)
open("fast-mult/half/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("fast-mult/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("half/libcrypt.so.1", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("libcrypt.so.1", O_RDONLY)         = -1 ENOENT (No such file or directory)
open("/lib/libcrypt.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1a\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\4\v\0\000"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=20156, ...}) = 0
old_mmap(NULL, 211196, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40266000
mprotect(0x4026b000, 190716, PROT_NONE) = 0
old_mmap(0x4026e000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x4026e000
old_mmap(0x40273000, 157948, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40273000
close(3)                                = 0
mprotect(0x40266000, 20480, PROT_READ|PROT_WRITE) = 0
mprotect(0x40266000, 20480, PROT_READ|PROT_EXEC) = 0
mprotect(0x40147000, 1105920, PROT_READ|PROT_WRITE) = 0
mprotect(0x40147000, 1105920, PROT_READ|PROT_EXEC) = 0
mprotect(0x40069000, 69632, PROT_READ|PROT_WRITE) = 0
mprotect(0x40069000, 69632, PROT_READ|PROT_EXEC) = 0
mprotect(0x40054000, 49152, PROT_READ|PROT_WRITE) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40018000
mprotect(0x40054000, 49152, PROT_READ|PROT_EXEC) = 0
mprotect(0x4004a000, 8192, PROT_READ|PROT_WRITE) = 0
mprotect(0x4004a000, 8192, PROT_READ|PROT_EXEC) = 0
mprotect(0x4003b000, 24576, PROT_READ|PROT_WRITE) = 0
mprotect(0x4003b000, 24576, PROT_READ|PROT_EXEC) = 0
mprotect(0x40031000, 8192, PROT_READ|PROT_WRITE) = 0
mprotect(0x40031000, 8192, PROT_READ|PROT_EXEC) = 0
mprotect(0x4001f000, 40960, PROT_READ|PROT_WRITE) = 0
mprotect(0x4001f000, 40960, PROT_READ|PROT_EXEC) = 0
brk(0)                                  = 0x1bc24
brk(0x1bcbc)                            = 0x1bcbc
brk(0x1c000)                            = 0x1c000
write(2, "Connecting to 192.168.1.111...\n", 31Connecting to 192.168.1.111...
) = 31
socketpair(PF_UNIX, SOCK_STREAM, 0, [3, 4]) = 0
fork()                                  = 166
close(4)                                = 0
close(4)                                = -1 EBADF (Bad file descriptor)
brk(0x1e000)                            = 0x1e000
write(3, "\0\0\0\5\1\0\0\0\3", 9)       = 9
read(3, OpenSSH_3.0.2p1, SSH protocols 1.5/2.0, OpenSSL 0x0090605f
debug1: Seeding random number generator
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: restore_uid
debug1: ssh_connect: getuid 0 geteuid 0 anon 1
debug1: Connecting to 192.168.1.111 [192.168.1.111] port 22.
debug1: temporarily_use_uid: 0/0 (e=0)
debug1: restore_uid
debug1: temporarily_use_uid: 0/0 (e=0)
debug1: restore_uid
debug1: Connection established.
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version WeOnlyDo-wodFTPD 3.2.2.395
debug1: no match: WeOnlyDo-wodFTPD 3.2.2.395
Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.0.2p1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-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,arcfour,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se
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
debug2: kex_parse_kexinit: none
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-group1-sha1,diffie-hellman-group14-sha1
debug2: kex_parse_kexinit: ssh-rsa
debug2: kex_parse_kexinit: aes128-cbc,aes128-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes192-ctr,aes256-cbc,aes256-ctr,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-cbc,aes128-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes192-ctr,aes256-cbc,aes256-ctr,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-sha1,hmac-md5,none
debug2: kex_parse_kexinit: hmac-sha1,hmac-md5,none
debug2: kex_parse_kexinit: zlib,none
debug2: kex_parse_kexinit: zlib,none
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: dh_gen_key: priv key bits set: 129/256
debug1: bits set: 497/1024
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 1
debug1: Host '192.168.1.111' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: bits set: 531/1024
debug1: ssh_rsa_verify: signature correct
debug1: kex_derive_keys
debug1: newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: waiting for SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: service_accept: ssh-userauth
debug1: got SSH2_MSG_SERVICE_ACCEPT
Authenticated with partial success.
debug1: authentications that can continue: password,publickey
debug3: start over, passed a different list password,publickey
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: next auth method to try is publickey
debug1: try privkey: /root/.ssh/id_rsa
debug3: no such identity: /root/.ssh/id_rsa
debug1: try privkey: /root/.ssh/id_dsa
debug3: no such identity: /root/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: next auth method to try is password
debug1: packet_send2: adding 64 (len 49 padlen 15 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: authentications that can continue: password,publickey
Permission denied, please try again.
debug1: packet_send2: adding 64 (len 49 padlen 15 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: authentications that can continue: password,publickey
Permission denied, please try again.
debug1: packet_send2: adding 64 (len 49 padlen 15 extra_pad 64)
debug2: we sent a password packet, wait for reply
Received disconnect from 192.168.1.111: 2: Too many attempts.
debug1: Calling cleanup 0x240d0(0x0)
0xbfffe3b8, 4)                  = -1 ECONNRESET (Connection reset by peer)
write(2, "Couldn\'t read packet: Connection"..., 48Couldn't read packet: Connection reset by peer
) = 48
_exit(255)                              = ?
On analysing the above statements I assume that the password for the given user is taken automatically(without asking to the user) and sent to server.. thats why authentication is failing twice and server is disconnecting the connection.. is it so? pls help in solving this..
 
Old 09-11-2014, 12:18 PM   #2
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Rep: Reputation: 61
Couple questions:
  1. Can you ssh to the device?
  2. Are you trying to authenticate with a password or a key?

Check your sshd_config file for the MaxAuthTries setting. This determines how many authentication attempts a client may make.
On the system you are trying to connect from, in your ~/.ssh/config file, put in an entry for this device. If you are just trying to do public key, put in lines with
Code:
PreferredAuthentications publickey
IdentityFile /path/to/private_key
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh login issue. a.abdulna Linux - Newbie 2 02-06-2014 08:46 AM
SSH login issue kumarsalmeda Linux - Newbie 4 08-25-2012 06:19 AM
[SOLVED] SSH login with public key issue ZAMO Linux - Security 3 07-02-2010 03:36 PM
Question about using the ssh login without password issue icammy Linux - Enterprise 2 04-03-2007 06:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration