1833475 Members
2699 Online
110052 Solutions
New Discussion

ssh not working

 
SOLVED
Go to solution
Bunty..
Occasional Advisor

ssh not working

till yesterday, I was able to connect to one of my server using ssh & telnet.

and now I am not able to connect using ssh.

I am able to connect using telnet.

how to solve this issue.
I need to make my server with ssh port
thanks
bunty
7 REPLIES 7
Steven E. Protter
Exalted Contributor
Solution

Re: ssh not working

Shalom Bunty,

In general:

1) Check that you can ping the server.
2) If you can ping but not connect, check that the inetd and ssh services are running
3) If you can not ping, check the physical network

First guess here is that sshd is not configured to run on the target server or it crashed.

See /var/adm/syslog/syslog.log

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bunty..
Occasional Advisor

Re: ssh not working

I am able to ping /telnet.
till yesterday i was able to ssh & telnet both.

but now i am not able to ssh.

please tell me the commands to make my server with ssh port again
Arunvijai_4
Honored Contributor

Re: ssh not working

Bunty, Check your ssh server is running by,

# ps -ef |grep -i sshd

If it is stopped for some reasons, You can start by,

# /sbin/init.d/secsh start

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Thummalu
Frequent Advisor

Re: ssh not working

After doing telnet as root user, execute the following...

/sbin/init.d/sshd2 stop if already ssh is running...

/sbin/init.d/sshd2 start

RAC_1
Honored Contributor

Re: ssh not working

If the problem is only with ssh and not with telnet, let us digg more into ssh problem.

From client
ssh -vvv "server_to_connect_to"

On server
sshd -ddd

Post it. This should give you some information to start with.
There is no substitute to HARDWORK
praveen..
Super Advisor

Re: ssh not working

I am able to connect using :
# ssh -vvv warbler
OpenSSH_3.7, SSH protocols 1.5/2.0, OpenSSL 0.9.7c 30 Sep 2003
HP-UX_Secure_Shell-A.03.71.006.%ic71N, HP_UX Secure Shell version
debug1: Reading configuration data /opt/ssh/etc/ssh_config
debug3: RNG is ready, skipping seeding
debug2: ssh_connect: needpriv 0
debug1: Connecting to warbler [170.118.8.21] port 22.
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 OpenSSH_3.7
debug1: match: OpenSSH_3.7 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.7
debug3: RNG is ready, skipping seeding
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,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,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
debug2: kex_parse_kexinit: none,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-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,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,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
debug2: kex_parse_kexinit: none,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_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 sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 123/256
debug2: bits set: 1547/3191
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 5
debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 5
debug1: Host 'warbler' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:5
debug2: bits set: 1661/3191
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/id_rsa (00000000)
debug2: key: /root/.ssh/id_dsa (00000000)
debug3: input_userauth_banner
Acceptable Use Policy

The use of this information system is limited to authorized users and subject
to monitoring at all times. Your use constitutes express consent to such
monitoring and that your use is not subject to any expectation of privacy.
If monitoring reveals possible evidence of criminal activity, this evidence
and related information, including identification information about the user,
may be provided to law enforcement officials. All communications may be
disclosed to law enforcement or third parties without consent or notice.
Further, appropriate disciplinary action may be taken for violations of
company policy or unauthorized use, including without limitation, revocation
of the access privileges and termination of employment.

debug1: Authentications that can continue: publickey,gssapi,password,keyboard-interactive
debug3: start over, passed a different list publickey,gssapi,password,keyboard-interactive
debug3: preferred gssapi,publickey,keyboard-interactive,password
debug3: authmethod_lookup gssapi
debug3: remaining preferred: publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi
debug1: Next authentication method: gssapi
debug2: we sent a gssapi packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi,password,keyboard-interactive
debug2: we sent a gssapi packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi,password,keyboard-interactive
debug2: we did not send a packet, disable method
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/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
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:


please suggest

paolo barila
Valued Contributor

Re: ssh not working

...type your password and then...
share share share