LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ssh terminated (https://www.linuxquestions.org/questions/linux-software-2/ssh-terminated-4175545320/)

esraam 06-14-2015 10:30 AM

ssh terminated
 
I am using scientific linux 6
I wrote the command line
# ssh master
but got the output
root@master's password:
Terminated
( it gives a terminated message without giving any time to write the password even )
Why does the ssh fails to run ?
What causes it to terminate ?
Can somebody help ?
Thanks in advance

Keruskerfuerst 06-14-2015 10:39 AM

Did you download the os from th internet?

273 06-14-2015 01:36 PM

You need to explain in full what you are doing. What OS is the server running and what OS is the guest running? Have you set SSH up so that root login is allowed (a bad idea if SSH is exposed to the internet)?
Assuming you have a CentOS server and are using a CentOS guest and haven't made any configuration changed to SSH then you should be able to SSH between them using your normal, no root, account.

esraam 06-15-2015 03:48 AM

Quote:

Originally Posted by 273 (Post 5377064)
You need to explain in full what you are doing. What OS is the server running and what OS is the guest running? Have you set SSH up so that root login is allowed (a bad idea if SSH is exposed to the internet)?
Assuming you have a CentOS server and are using a CentOS guest and haven't made any configuration changed to SSH then you should be able to SSH between them using your normal, no root, account.

OS : Scientific linux on both
no root ?
you mean root can't access ssh ?

esraam 06-15-2015 06:49 AM

Quote:

Originally Posted by Keruskerfuerst (Post 5376999)
Did you download the os from th internet?

I didn't download it myself but I think It was downloaded from a CD .
What is the difference ?
How can the source affect ( ssh) ?
Thanks

michaelk 06-15-2015 07:14 AM

Try the command ssh -vvv master and post the output. It will add additional debug information. logging in as root is discouraged but possible.

esraam 06-15-2015 09:46 AM

Quote:

Originally Posted by michaelk (Post 5377361)
Try the command ssh -vvv master and post the output. It will add additional debug information. logging in as root is discouraged but possible.

#ssh -vvv master

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: 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-sert 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 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: 527/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: 498/1024
debug1: ssh_rsa_verify: signature correct
debug2: Kex_drive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
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
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: worte 64 bytes for a total of 1277
debug1: Authentications that can continue: publickey,gssapi-keyey,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
debug3: preferred host based, publickey,keyboard-inteactive,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
root@master's password:
Terminated

esraam 06-15-2015 09:51 AM

Does ssh command requires internet connection as a necessity ?
even if I am trying to use the master to access the master itself ?

michaelk 06-15-2015 10:01 AM

No, "internal networking" is via the local loopback adapter i.e localhost or lo (127.0.0.1)

What happens if you try to connect with a normal user.

ssh user@master

esraam 06-15-2015 10:05 AM

Quote:

Originally Posted by michaelk (Post 5377439)
No, "internal networking" is via the local loopback adapter i.e localhost or lo (127.0.0.1)

well ,
Can the output of
#ssh -vvv master
written above be helpful ?

I still can't figure out how to get ssh to work ?
Hope you can help
thanks

michaelk 06-15-2015 10:18 AM

What happens if you try to connect with a regular user. Did you create a regular user?

ssh user@master

273 06-15-2015 12:56 PM

Quote:

Originally Posted by esraam (Post 5377304)
no root ?
you mean root can't access ssh ?

By default root is generally not allowed to log in via SSH, no.
What are you trying to achieve here?
Most SSH implementations don't allow root login, especially with password, as that would leave a system open to brute-force attacks.
Sorry, I don't have any good links about SSH but hopefully somebody else will as it is well worth reading a bit about things before you start using them and SSH is very useful -- whether you're just connecting a couple of machines at home to swap files or wanting to learn towards a career in Linux.

esraam 06-16-2015 03:13 AM

Quote:

Originally Posted by michaelk (Post 5377451)
What happens if you try to connect with a regular user. Did you create a regular user?

ssh user@master

trying to connect with a regular user gives the following message :

Couldn't open /dev/null: Permission denied

so what do you think I shall do ?
Thanks

esraam 06-16-2015 03:15 AM

Quote:

Originally Posted by 273 (Post 5377523)
By default root is generally not allowed to log in via SSH, no.
What are you trying to achieve here?
Most SSH implementations don't allow root login, especially with password, as that would leave a system open to brute-force attacks.
Sorry, I don't have any good links about SSH but hopefully somebody else will as it is well worth reading a bit about things before you start using them and SSH is very useful -- whether you're just connecting a couple of machines at home to swap files or wanting to learn towards a career in Linux.

I am searching for data on SSH on google that may help but couldn't find the useful data yet
Hope somebody can help
Thanks

273 06-16-2015 12:15 PM

Quote:

Originally Posted by esraam (Post 5377896)
trying to connect with a regular user gives the following message :

Couldn't open /dev/null: Permission denied

so what do you think I shall do ?
Thanks

I think you need to create a user account on that machine.
If you don't know what SSH is and how it works then please explain why you want to install it.
People here will try to help but as far as I am aware none are mind readers so can only do on the information you give.


All times are GMT -5. The time now is 05:10 AM.