1834742 Members
2817 Online
110070 Solutions
New Discussion

Re: Unable to SSH .

 
SOLVED
Go to solution
dictum9
Super Advisor

Unable to SSH .

I am trying to ssh to a system. It hangs before even gets to it, it cannot get into port 22. I restarted both the sshd daemon and the inetd daemon.


# ssh -v -v -v sdapca9
Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to sdapca9 [109.99.254.63] port 22.
12 REPLIES 12
Pupil_1
Trusted Contributor
Solution

Re: Unable to SSH .

Are you able to ssh back from the other machine?
There is always something new to learn everyday !!
dictum9
Super Advisor

Re: Unable to SSH .

OK, on the machine I am trying to restart sshd:

/sbin/init.d/sshd start

/usr/local/sbin/sshd

they both hang...

dictum9
Super Advisor

Re: Unable to SSH .

I cannot ssh on that machine, period, not even to itself, not even as a non-root user.

James R. Ferguson
Acclaimed Contributor

Re: Unable to SSH .

Hi:

/* on_soapbox */

I would hope that you would refrain from titles and subject body's with "Claim your many points here" and such.

In my opinion, it demeans what our collective, principal objective is all about.

/* off_soapbox */

Thanks & Regards!

...JRF...

Pupil_1
Trusted Contributor

Re: Unable to SSH .

Are both the machines HP-UX? Where there any sshd deamons running before you stopped sshd?
There is always something new to learn everyday !!
Mel Burslan
Honored Contributor

Re: Unable to SSH .

on the machine where you can not even start sshd, did you get a successful installation of secureshell package ? If so, which version do you have ?

swlist -l fileset | grep -i secure

what does it show.


PS. I have to agree with James Ferguson about the points aspect. If people are responding to your requests for points, it is not the true spirit. If you assigning 10 points to every each answer, not only the one providing the real solution, you will attract a lot of, what I call "point collectors" with no actual knowledge about the subject. And we all know there are plenty of these people around, ruining the system. Points should be the measure of quality not quantity. Off my soapbox too.
________________________________
UNIX because I majored in cryptology...
Jaime Bolanos Rojas.
Honored Contributor

Re: Unable to SSH .

Hi etc,

Please send the output for:

ssh -v

It might give you and idea of what is wrong with that thing.

Regards,

Jaime.
Work hard when the need comes out.
Matti_Kurkela
Honored Contributor

Re: Unable to SSH .


(Soapbox: Please score the answers according to how effective they are in solving your problem. That's how everyone can later use the scores to find the _best_ solutions.)

OK, it appears that sshd is somewhat broken on your sdapca9 system.

Which is the OS version on that system?

Does the system have an ipfilter or some other packet filter/firewall installed?
A situation where traffic to port 22 is DROPped looks just like your situation.
A packet filter with a very draconian configuration may block localhost traffic too.

Does that system have /dev/random and /dev/urandom?

If it doesn't, sshd should spawn some child processes when it starts up. Those processes gather random number by doing things like "df", "netstat -an", "ps" with various options or "vmstat". (man ssh-rand-helper, then see the ssh_prng_cmds file to find out the commands it runs).

If something causes these child processes to hang, it may prevent sshd from completing start-up. Look for NFS mounts from servers that are unreachable, or disks gone bad in an apparently-infinite retry loop. If you find one of those, fix it first, worry about sshd after that. If you need a work-around, find out the command that's causing trouble and comment it out of ssh_prng_cmds.

If this doesn't help (or if you have /dev/random, making your system almost more resistant to random-number-generation problems), stop all sshd processes and then start sshd in debug mode:
/usr/local/sbin/sshd -d

When you do this, sshd does not become a daemon and it will only accept one connection before stopping. It will also output very much debug information to your session.
Things to check:
- does it output the message "Server listening on [...] port 22"?
- if it does, what happens when someone tries to log in using SSH?
- if it detects the login attempt and goes through the authentication process, does it get to the point where it outputs the message "Entering interactive session [...]"?
MK
Geoff Wild
Honored Contributor

Re: Unable to SSH .

Anything in /var/adm/syslog/syslog.log ?

Is SSHD_START=1 in /etc/rc.config.d/sshd?

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
inventsekar_1
Respected Contributor

Re: Unable to SSH .

this may give some ideas to u, to others, to me some information.
Chapter 5 Troubleshooting HP-UX Secure Shell
http://docs.hp.com/en/T1471-90024/ch05.html
SSH faq:
http://docs.hp.com/en/6073/FAQ-SSH.pdf


Be Tomorrow, Today.
dictum9
Super Advisor

Re: Unable to SSH .



There appears to be a hung NFS process. bdf hangs... some strangness. Could this have something to do with the ssh problem?

It's running 11.11 but I am going to install the latest and the greatest 11.23, so I think the ssh problems will become a moot point.

dictum9
Super Advisor

Re: Unable to SSH .

P.S.

Thanks for the long reply Matti, et al, I will definitely save it for future reference.