LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-21-2015, 04:24 AM   #31
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 esraam View Post
"ssh -vvv ..." (in "[ code ]"... "[ /code ]"
what shall be in [code] ?
The results of the test.
Quote:

It should be drwx ..... and not crwx ?
If it is a "c" as the first character, then it is a device, and not a directory - and DEFINITELY something wrong on your system. Users should never have a device node in their directory.
Quote:
I think it is the server side as I am only using the server to make local connection on the server .
But how to solve this ?
That is what we are trying to identify.
 
Old 06-21-2015, 04:30 AM   #32
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
#ssh -vvv em@maswtser

gives the following output :

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: identity file /home/em/.ssh/identity type -1
debug1: identity file /home/em/.ssh/identity-cert type -1
debug1: identity file /home/em/.ssh/id_rsa type -1
debug1: identity file /home/em/.ssh/id rsa-sert type -1
debug1: identity file /home/em/.ssh/id_dsa type -1
debug1: identity file /home/em/.ssh/id_dsa_cert type -1
debug1: identity file /home/em/.ssh/id_ecdsa type -1
debug1: identity file /home/em/.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 0_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-shal, diffie-hellman-group14-shall,diffie-hellman-group1-shal
debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com, ssh-dss-cert-v01@openssh.com, ssh-rsa-cert-v00@openssh.com,ssh-dss...00@openssh.com,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-96,hmac-md5-96
debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-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-shal, diffie-hellman-group14-shall,diffie-hellman-group1-shal
debug2: Kex_parse_kexinit: ssh-rsa, ssh-dss
debug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-96,hmac-md5-96
debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-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: mac_setup: found hmac-md5
debug1: Kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: Kex: server->client 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 123/256
debug2: bits set: 540/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 /home/em/.ssh/known_hosts
debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts
debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts
debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts
debug3: check_host_in_hostfile: host 192.168.0.200 filename /home/em/.ssh/known_hosts
debug3: check_host_in_hostfile: host 192.168.0.200 filename /home/em/.ssh/known_hosts
debug3: check_host_in_hostfile: host 192.168.0.200 filename /etc/ssh/ssh_known_hosts
debug3: check_host_in_hostfile: host 192.168.0.200 filename /etc/ssh/ssh_known_hosts
debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts
debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts
debug2: no key of type 0 for host master
debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
debug2: no key of type 2 for host master
debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
debug2: no key of type 3 for host master
The authenticity of host 'master (192.168.0.200) ' can't be established
RSA key fingerprint is f0:80:f7:67:23:d4:12:90:f7:c1:a5:bb:c9:16:19:22
Are you sure you want to continue connecting (yes/no) ? Terminated

]]]

Is that what you mean ?
can that help find where the error is ?
thanks
 
Old 06-21-2015, 06:08 AM   #33
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
Yes. It looks like it is a server side failure.

I have seen that error before, but it was a LONG time ago, and I'm having trouble recalling the fix.

Is is possible for you to have access to the console of the server?

I'm asking that because the next step is to run the sshd server in debug mode to see what is going on. This is normally done on the console by first stopping the sshd service, then running it on the console with the command "sshd -d -e". This will run the server attached to the console, with debugging (a single -d is first level, and like the -v of ssh, can be used up to three times for maximum logging), and all messages will be sent to the console (the -e option). It is possible redirect stdout and stderr (where the messages go) to a file that then have the debug trace shown for more analysis.

Once the debug process is started, an ssh session can be attempted - and if the server is having a problem it should record something before it aborts.
 
Old 06-21-2015, 06:29 AM   #34
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
Yes. It looks like it is a server side failure.

I have seen that error before, but it was a LONG time ago, and I'm having trouble recalling the fix.

Is is possible for you to have access to the console of the server?

I'm asking that because the next step is to run the sshd server in debug mode to see what is going on. This is normally done on the console by first stopping the sshd service, then running it on the console with the command "sshd -d -e". This will run the server attached to the console, with debugging (a single -d is first level, and like the -v of ssh, can be used up to three times for maximum logging), and all messages will be sent to the console (the -e option). It is possible redirect stdout and stderr (where the messages go) to a file that then have the debug trace shown for more analysis.

Once the debug process is started, an ssh session can be attempted - and if the server is having a problem it should record something before it aborts.
Yes I have access to the server console.
[ run the sshd server in debug mode ] How ?

you mean I use the terminal on the server itself

and type the following
# service sshd stop
# sshd -d -e

then list here the debug trace ?
right ?

Do I need to switch to the cli mode ??

thanks

Last edited by esraam; 06-21-2015 at 06:37 AM.
 
Old 06-21-2015, 09:57 AM   #35
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
yes. For this level of debugging the CLI is mandatory. Anything else will lose data.

You might have to use the full path to sshd (which is usually /usr/sbin/sshd, or /sbin/sshd), it depends on how the root account is set up.

Last edited by jpollard; 06-21-2015 at 10:08 AM.
 
Old 06-21-2015, 10:30 AM   #36
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by esraam View Post
With another user , I got the following :
[
The authenticity of host 'master (192.168.0.200)' can't be established.
RSA key fingerprint is f0:80:f7:67:23:d4:12:90:f7:c1:a5:bb:a5:bb:c9:16:19:22
Are you sure you want to continue connecting (yes/no)? Terminated
]

I can log in as root and change settings if necessary.
Please tell me what settings need to be changed ?
And How to change them .

Thanks alot
Please use code tags.
I take it you selected yes at this point? This looks like a successful connection but if it then give s the /dev/nul error it may mean that the user account wasn't set up correctly.
Can't the person who created your user account help with this? They should give you instructions of how to log in and tell you which credentials to use.
 
Old 06-21-2015, 07:07 PM   #37
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 273 View Post
Please use code tags.
I take it you selected yes at this point? This looks like a successful connection but if it then give s the /dev/nul error it may mean that the user account wasn't set up correctly.
Can't the person who created your user account help with this? They should give you instructions of how to log in and tell you which credentials to use.
Actually, the user account hasn't been started yet - first the user has to accept that the targeted system is the correct one, then ssh will complete the identification exchange and record the systems public key in the known_hosts file. After that the users password (or keys) are tested. Only after the user has finally authenticated to the system will the user account be started (and gives a different error if it is not authorized).

A terminated message can come from several places - a very unlikely one is a resource limitation causes the server to abort. Another is a memory failure causing the socket to be closed. sshd has a number of security features (enabled/disabled whatever) that can also cause issues (such as running sshd in a privilege separated account). Access failures to certain files needed can cause an abort (such as the /dev/null case, but access to the public/private keys--though this one has been passed).

The console log should answer a number of questions and give a better idea of the failure.
 
Old 06-22-2015, 03:25 AM   #38
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
yes. For this level of debugging the CLI is mandatory. Anything else will lose data.

You might have to use the full path to sshd (which is usually /usr/sbin/sshd, or /sbin/sshd), it depends on how the root account is set up.
The full path is /usr/sbin/sshd
however ;
typing the following in the cli :
# cd /usr/sbin
#service sshd stop

#sshd -d -e
this gives error :
sshd re-exec requires execution with absolute path

so trying
# cd sshd
gives error
- bash: cd: sshd : Not a directory

I know sshd is a file ... How can I make the correct absolute path to get sshd to re-exec ?

Thanks
 
Old 06-22-2015, 03:53 AM   #39
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
# /usr/sbin/sshd -d -e
gives :
[
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

]

Then waiting waiting waiting .
It doesn't exit the execution and doesn't change the results for quite long time.

Do you think this helps to find where the error is ?
Great thanks for you help
 
Old 06-22-2015, 04:52 AM   #40
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
This shows that sshd has started, and is waiting for a connection.

Now you have to use ssh to make a connection. That is when the error occurs.
 
Old 06-22-2015, 05:01 AM   #41
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
This shows that sshd has started, and is waiting for a connection.

Now you have to use ssh to make a connection. That is when the error occurs.
Sorry , I couldn't understand .
How can I use ssh now ?
How can I solve the error ?
 
Old 06-22-2015, 05:17 AM   #42
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
Do you even understand how a client/server application works?

There are two parts that work together. A client, and a server.

In this case, ssh is the client. sshd is the server.

It is apparent that the client is working. It is also apparent that the server is working... UNTIL the client makes a connection.

The debugging log you showed from the client has shown what the client is interpreting from the server:
Code:
(client)OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
(client)debug1: Reading configuration data /etc/ssh/ssh_config
(client)debug1: Applying options for *
(client)debug2: ssh_connect: needpriv 0
(client)debug1: Connecting to master [192.168.0.200] port 22.
(client)debug1: Connection established
(client)debug1: identity file /home/em/.ssh/identity type -1
(client)debug1: identity file /home/em/.ssh/identity-cert type -1
(client)debug1: identity file /home/em/.ssh/id_rsa type -1
(client)debug1: identity file /home/em/.ssh/id rsa-sert type -1
(client)debug1: identity file /home/em/.ssh/id_dsa type -1
(client)debug1: identity file /home/em/.ssh/id_dsa_cert type -1
(client)debug1: identity file /home/em/.ssh/id_ecdsa type -1
(client)debug1: identity file /home/em/.ssh/id_ecdsa-cert type -1
(server)debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
(client)debug1: match: OpenSSH_5.3 pat OpenSSH*
(client)debug1: Enabling compatibility mode for protocol 2.0
(client to server)debug1: Local version string SSH-2.0-OpenSSH_5.3
(client)debug2: fd 3 setting 0_NONBLOCK
(client)debug1: SSH2_MSG_KEXINIT sent
(client)debug3: Wrote 960 bytes for a total of 981
(server to client)debug1: SSH2_MSG_KEXINIT received
(client)debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256, diffie-hellman0group-exchange-shal, diffie-hellman-group14-shall,diffie-hellman-group1-shal
clientdebug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com, ssh-dss-cert-v01@openssh.com, ssh-rsa-cert-v00@openssh.com,ssh-dss...00@openssh.com,ssh-rsa,ssh-dss
clientdebug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
(client)debug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
(client)debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-96,hmac-md5-96
(client)debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-96,hmac-md5-96
(client)debug2: Kex_parse_kexinit: none, zlib@openssh.com ,zlib
(client)debug2: Kex_parse_kexinit: none, zlib@openssh.com ,zlib
(client)debug2: Kex_parse_kexinit:
(client)debug2: Kex_parse_kexinit:
(client)debug2: Kex_parse_kexinit: first_kex_follows 0
(client)debug2: Kex_parse_kexinit: reserved 0
(client)debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-shal, diffie-hellman-group14-shall,diffie-hellman-group1-shal
(client)debug2: Kex_parse_kexinit: ssh-rsa, ssh-dss
(client)debug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
(client)debug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
(client)debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-96,hmac-md5-96
(client)debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-96,hmac-md5-96
(client)debug2: Kex_parse_kexinit: none, zlib@openssh.com ,zlib
(client)debug2: Kex_parse_kexinit: none, zlib@openssh.com ,zlib
(client)debug2: Kex_parse_kexinit:
(client)debug2: Kex_parse_kexinit:
(client)debug2: Kex_parse_kexinit: first_kex_follows 0
(client)debug2: Kex_parse_kexinit: reserved 0
(client)debug2: mac_setup: found hmac-md5
(client)debug1: Kex: server->client aes128-ctr hmac-md5 none
(client)debug2: mac_setup: found hmac-md5
(client)debug1: Kex: server->client aes128-ctr hmac-md5 none
(client to server)debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
(client to server)debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
(client to server)debug3: Wrote 24 bytes for a total of 1005
(client)debug2: dh_gen_key: priv key bits set 123/256
(client)debug2: bits set: 540/1024
(client to server)debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
(client)debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
(client)debug3: Wrote 144 bytes for a total of 1149
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts
d(client)ebug3: check_host_in_hostfile: host 192.168.0.200 filename /home/em/.ssh/known_hosts
(client)debug3: check_host_in_hostfile: host 192.168.0.200 filename /home/em/.ssh/known_hosts
(client)debug3: check_host_in_hostfile: host 192.168.0.200 filename /etc/ssh/ssh_known_hosts
(client)debug3: check_host_in_hostfile: host 192.168.0.200 filename /etc/ssh/ssh_known_hosts
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts
(client)debug2: no key of type 0 for host master
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
(client)debug2: no key of type 2 for host master
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
(client)debug2: no key of type 3 for host master
(client)The authenticity of host 'master (192.168.0.200) ' can't be established
(client)RSA key fingerprint is f0:80:f7:67:23:d4:12:90:f7:c1:a5:bb:c9:16:19:22
(client to you)Are you sure you want to continue connecting (yes/no) ?
(server?)Terminated
So what did the server side do during the connection that failed?

To find out, it is necessary to get a fairly detailed log of what happens during the connection.
 
Old 06-22-2015, 05:27 AM   #43
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
Do you even understand how a client/server application works?

There are two parts that work together. A client, and a server.

In this case, ssh is the client. sshd is the server.

It is apparent that the client is working. It is also apparent that the server is working... UNTIL the client makes a connection.

The debugging log you showed from the client has shown what the client is interpreting from the server:
Code:
(client)OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
(client)debug1: Reading configuration data /etc/ssh/ssh_config
(client)debug1: Applying options for *
(client)debug2: ssh_connect: needpriv 0
(client)debug1: Connecting to master [192.168.0.200] port 22.
(client)debug1: Connection established
(client)debug1: identity file /home/em/.ssh/identity type -1
(client)debug1: identity file /home/em/.ssh/identity-cert type -1
(client)debug1: identity file /home/em/.ssh/id_rsa type -1
(client)debug1: identity file /home/em/.ssh/id rsa-sert type -1
(client)debug1: identity file /home/em/.ssh/id_dsa type -1
(client)debug1: identity file /home/em/.ssh/id_dsa_cert type -1
(client)debug1: identity file /home/em/.ssh/id_ecdsa type -1
(client)debug1: identity file /home/em/.ssh/id_ecdsa-cert type -1
(server)debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
(client)debug1: match: OpenSSH_5.3 pat OpenSSH*
(client)debug1: Enabling compatibility mode for protocol 2.0
(client to server)debug1: Local version string SSH-2.0-OpenSSH_5.3
(client)debug2: fd 3 setting 0_NONBLOCK
(client)debug1: SSH2_MSG_KEXINIT sent
(client)debug3: Wrote 960 bytes for a total of 981
(server to client)debug1: SSH2_MSG_KEXINIT received
(client)debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256, diffie-hellman0group-exchange-shal, diffie-hellman-group14-shall,diffie-hellman-group1-shal
clientdebug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com, ssh-dss-cert-v01@openssh.com, ssh-rsa-cert-v00@openssh.com,ssh-dss...00@openssh.com,ssh-rsa,ssh-dss
clientdebug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
(client)debug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
(client)debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-96,hmac-md5-96
(client)debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-96,hmac-md5-96
(client)debug2: Kex_parse_kexinit: none, zlib@openssh.com ,zlib
(client)debug2: Kex_parse_kexinit: none, zlib@openssh.com ,zlib
(client)debug2: Kex_parse_kexinit:
(client)debug2: Kex_parse_kexinit:
(client)debug2: Kex_parse_kexinit: first_kex_follows 0
(client)debug2: Kex_parse_kexinit: reserved 0
(client)debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-shal, diffie-hellman-group14-shall,diffie-hellman-group1-shal
(client)debug2: Kex_parse_kexinit: ssh-rsa, ssh-dss
(client)debug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
(client)debug2: kex_parse_kexinit: aes128-ctr, aes192-ctr, arcfour256,arcfour128,aes128-cdc,3des-cdc-blowfish-cbc,cast128-cdc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
(client)debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-96,hmac-md5-96
(client)debug2: Kex_parse_kexinit: hmac-md5, hmac-shal, umac-64@openssh.com,hmac-sha2-256,hm...60@openssh.com,hmac-shal-96,hmac-md5-96
(client)debug2: Kex_parse_kexinit: none, zlib@openssh.com ,zlib
(client)debug2: Kex_parse_kexinit: none, zlib@openssh.com ,zlib
(client)debug2: Kex_parse_kexinit:
(client)debug2: Kex_parse_kexinit:
(client)debug2: Kex_parse_kexinit: first_kex_follows 0
(client)debug2: Kex_parse_kexinit: reserved 0
(client)debug2: mac_setup: found hmac-md5
(client)debug1: Kex: server->client aes128-ctr hmac-md5 none
(client)debug2: mac_setup: found hmac-md5
(client)debug1: Kex: server->client aes128-ctr hmac-md5 none
(client to server)debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
(client to server)debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
(client to server)debug3: Wrote 24 bytes for a total of 1005
(client)debug2: dh_gen_key: priv key bits set 123/256
(client)debug2: bits set: 540/1024
(client to server)debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
(client)debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
(client)debug3: Wrote 144 bytes for a total of 1149
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts
d(client)ebug3: check_host_in_hostfile: host 192.168.0.200 filename /home/em/.ssh/known_hosts
(client)debug3: check_host_in_hostfile: host 192.168.0.200 filename /home/em/.ssh/known_hosts
(client)debug3: check_host_in_hostfile: host 192.168.0.200 filename /etc/ssh/ssh_known_hosts
(client)debug3: check_host_in_hostfile: host 192.168.0.200 filename /etc/ssh/ssh_known_hosts
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts
(client)debug2: no key of type 0 for host master
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
(client)debug2: no key of type 2 for host master
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /home/em/.ssh/known_hosts2
(client)debug3: check_host_in_hostfile: host master filename /etc/ssh/ssh_known_hosts2
(client)debug2: no key of type 3 for host master
(client)The authenticity of host 'master (192.168.0.200) ' can't be established
(client)RSA key fingerprint is f0:80:f7:67:23:d4:12:90:f7:c1:a5:bb:c9:16:19:22
(client to you)Are you sure you want to continue connecting (yes/no) ?
(server?)Terminated
So what did the server side do during the connection that failed?

To find out, it is necessary to get a fairly detailed log of what happens during the connection.
To find out, it is necessary to get a fairly detailed log of what happens during the connection

How ?

The fact is I am making a local connection on the server now.
So, you can see that the server is acting as a client and a server at the same time .
I am using the server to make remote-connection on the server itself ( as a test first before trying to connect to clients with remote access )

Do you think there is a problem having the server to connect to itself that makes the ssh terminates ?

How can I get a detailed log of what happens during the connection ?
Shall I use a certain command line or what ?

Sorry for my little knowledge but I am new to linux and I have to do the task .
Thanks for your help.
Hope we can get together to solve the ssh termination problem .
 
Old 06-22-2015, 06:56 AM   #44
esraam
Member
 
Registered: Apr 2015
Posts: 110

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
Please use code tags.
I take it you selected yes at this point? This looks like a successful connection but if it then give s the /dev/nul error it may mean that the user account wasn't set up correctly.
Can't the person who created your user account help with this? They should give you instructions of how to log in and tell you which credentials to use.
I didn't have the chance to select ( yes)
It terminated before giving me the chance.
I created the user account by myself .
The responsible person only gave me the permission to log in as root on the server, create a new user and use ssh .
They don't know why ssh terminated and they asked me to solve the problem myself .
I have little knowledge , you see
and I am trying to google search and ask on the forum to get help.
but couldn't yet.

Do you have any suggestions that may help ?
Define the error and solve it ?
We could find that a server problem caused the error.
I don't know what problem or even how to find it out

Hope some body can help.
Thanks
 
Old 06-22-2015, 07:00 AM   #45
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
I already gave you directions.

1. setup the server to make a detailed log from sshd

2. make a connection to the server.
 
  


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 03:17 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