LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-24-2015, 07:28 AM   #61
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513

Ok. It is possible it got created. As I said, it is not a fatal error.

It should be working now. What was wrong? don't know. Something changed between the fatal error and now.

I was half expecting a failure at/between the point in your log with "debug1: allocating pty." and "debug1: session_pty_req: session 0 alloc /dev/pts/3" That failure didn't happen. If it had, I would have understood the "Terminated" message, as without a pty, the user session cannot be started.

Last edited by jpollard; 06-24-2015 at 07:33 AM.
 
1 members found this post helpful.
Old 06-24-2015, 09:49 AM   #62
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
So with a debug session that you create you may notice this line
Code:
debug1: Server will not fork when running in debugging mode.
This means that the sshd cannot split off the process. This means that only one connection can be made and when it completes, the sshd process dies with it.

Code:
SSH_CONNECTION= 192.168.0.200 35706 192.168.0.200 2000
I'm confused. You're connecting to the server from the server? (to itself?)

The first ip address should be the clients, the second should be the server. Is this intentional? The original problem is you're trying to login to another computer right?
If you just want to switch user accounts locally, you can use su
 
Old 06-25-2015, 06:05 AM   #63
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by Sefyir View Post
So with a debug session that you create you may notice this line
Code:
debug1: Server will not fork when running in debugging mode.
This means that the sshd cannot split off the process. This means that only one connection can be made and when it completes, the sshd process dies with it.
That is why it is a debug session. You can't debug very well when what you are debugging detatches from your trace...
Quote:

Code:
SSH_CONNECTION= 192.168.0.200 35706 192.168.0.200 2000
I'm confused. You're connecting to the server from the server? (to itself?)

The first ip address should be the clients, the second should be the server. Is this intentional? The original problem is you're trying to login to another computer right?
If you just want to switch user accounts locally, you can use su
Again, this is reasonable to do for a test of the server. If this works, yet remote connections still fail, the problem is not in sshd - it may be a firewall, or a router misconfiguration dropping connections/routes when it shouldn't.
 
Old 07-02-2015, 04:10 AM   #64
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
Ok. It is possible it got created. As I said, it is not a fatal error.

It should be working now. What was wrong? don't know. Something changed between the fatal error and now.

I was half expecting a failure at/between the point in your log with "debug1: allocating pty." and "debug1: session_pty_req: session 0 alloc /dev/pts/3" That failure didn't happen. If it had, I would have understood the "Terminated" message, as without a pty, the user session cannot be started.
But Why Am I an unable to run it using the default port number ?
I tried the following

# service sshd stop
# /usr/sbin/sshd -d -e

on the server terminal , I got a debug until I got
Server listening on :: port 22

Then on the client side I tried
# ssh -v user@host

I also got a debug until The password line Then terminated without giving me the chance to write the password
and consequently , the server side also terminated

Why does this happen ?
How can I solve it ?
Thanks
 
Old 07-02-2015, 04:46 AM   #65
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
That is why I suggested stopping the service, and debug using the default port.

It is STILL possible that a router is dropping the connection due to filtering. I would have expected that would have killed it a lot earlier in the handshake though.
 
Old 07-02-2015, 04:59 AM   #66
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
That is why I suggested stopping the service, and debug using the default port.

It is STILL possible that a router is dropping the connection due to filtering. I would have expected that would have killed it a lot earlier in the handshake though.
Can we solve this ?
Do you find out the problem and how to get it to connect on the default port ?

Thanks
 
Old 07-02-2015, 08:15 AM   #67
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
First the problem has to be identified.

All that appears to have been done so far just eliminates the user account from being a problem.

It also appears to not be a problem if a non-standard port is used.

Now, why is the port a problem? And is it really the problem?

What was the output of the server (and client) when you tried the server in debug mode?
 
Old 07-05-2015, 04:09 AM   #68
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
First the problem has to be identified.

All that appears to have been done so far just eliminates the user account from being a problem.

It also appears to not be a problem if a non-standard port is used.

Now, why is the port a problem? And is it really the problem?

What was the output of the server (and client) when you tried the server in debug mode?
I am not sure if I understood what you mean by ( in debug mode ) ?
Do you need the output on the terminal with the default port ?
Or what do you mean ?
 
Old 07-05-2015, 05:01 AM   #69
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
client side :

# ssh -vvv em@master
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to master [192.168.0.200] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/identity-cert type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug3: Wrote 960 bytes for a total of 981
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-dss...00@openssh.com,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,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-sha256,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-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-512,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_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
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
debug3: Wrote 24 bytes for a total of 1005
debug2: dh_gen_key: priv key bits set: 120/256
debug2: bits set: 538/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: Wrote 144 bytes for a total of 1149
debug3: check_host_in_hostfile: host master filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: host master filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 6
debug3: check_host_in_hostfile: host 192.168.0.200 filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: host 192.168.0.200 filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 6
debug1: Host 'master' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:6
debug2: bits set: 499/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
debug3: Wrote 16 bytes for a total of 1165
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug3: Wrote 48 bytes for a total of 1213
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))
debug2: key: /root/.ssh/id_ecdsa ((nil))
debug3: Wrote 64 bytes for a total of 1277
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
debug3: preferred hostbased,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
debug1: Trying private key: /root/.ssh/id_ecdsa
debug3: no such identity: /root/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
em@master's password:
Terminated



---------- Post added 07-05-15 at 05:01 AM ----------

server side :

[root@master ~]# /usr/sbin/sshd -d -e
debug1: sshd version OpenSSH_5.3p1
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: rexec_argv[2]='-e'
Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: sshd version OpenSSH_5.3p1
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: inetd sockets after dupping: 3, 3
Connection from 192.168.0.200 port 54450
debug1: Client protocol version 2.0; client software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: permanently_set_uid: 74/74
debug1: list_hostkey_types: ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received
debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT
debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: KEX done
debug1: userauth-request for user em service ssh-connection method none
debug1: attempt 0 failures 0
debug1: PAM: initializing for "em"
debug1: PAM: setting PAM_RHOST to "master"
debug1: PAM: setting PAM_TTY to "ssh"
Terminated
[root@master ~]# Connection closed by 192.168.0.200
debug1: do_cleanup
mm_request_send: write: Broken pipe

 
Old 07-05-2015, 05:21 AM   #70
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Neither ssh nor sshd appears to have caused the termination.

Since this was effectively a loopback (both source and destination IP numbers are 192.168.0.200) it may be done by a firewall on 192.168.0.200.

It is possible that a PAM configuration is killing it (such as the one documented here: https://groups.google.com/forum/#!to...sc/rI-J3FwKsMM)

These are the only two possibilities I can think of.
 
Old 07-06-2015, 12:14 AM   #71
govindaram
LQ Newbie
 
Registered: Jul 2015
Posts: 1

Rep: Reputation: Disabled
check the ssh service is running in your machine,
check the iptables status,
check aster user is available or not,
and try to connect it,
ssh <username>@<ipaddress>
 
Old 07-06-2015, 03:23 AM   #72
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by govindaram View Post
check the ssh service is running in your machine,
check the iptables status,
check aster user is available or not,
and try to connect it,
ssh <username>@<ipaddress>
Would you please write the command lines for each function ?
I actually don't know how to check ?
I tried to use sshd -vvv
then ssh user@host
with a non standard port and it worked .
but it failed with the standard port .
What check do you suggest ?

Code:
#iptables -L -n
gives :
[ Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
]

Code:
 
# ssh user@ipaddress
ssh: connect to host 192.168.0.200 port 22: connection refused

Quote:
check " aster " user is available
?
how ?
Sorry what is " aster " ?
 
  


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
[SOLVED] Terminated by signal 13 bellsal Linux - Newbie 6 01-06-2011 10:19 PM
vi command terminated cmnorton Linux - General 2 02-12-2008 06:48 AM
Child terminated with 1 status kahlil88 Linux - Security 1 11-26-2005 04:33 AM
Azureus TERMINATED. unexpectedly. J_7D5 Linux - Software 3 11-11-2005 06:36 AM
Terminals terminated by nVidia babyphil Linux - Newbie 0 06-14-2004 10:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:43 PM.

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