Operating System - HP-UX
1836593 Members
3294 Online
110102 Solutions
New Discussion

Re: SSH: HP-UX Secure Shell failing stesockopt() syscalls

 
Ralph Grothe
Honored Contributor

SSH: HP-UX Secure Shell failing stesockopt() syscalls

Hello again,

on one HP-UX box I get lots of syslog.log entries from sshd about invalid arguments while sshd was attempting to set SO_KEEPALIVE through a setsockopt() syscall.

The sshd that is causing this is the socalled Secur Shell port from HP

# swlist T1471AA
# Initializing...
# Contacting target "bode"...
#
# Target: bode:/
#

# T1471AA A.03.10.002 HP-UX Secure Shell
T1471AA.Secure_Shell A.03.10.002 HP-UX Secure Shell


# sshd -h 2>&1|head -3
sshd: option requires an argument -- h
sshd version OpenSSH_3.1p1
Usage: sshd [options]


[root@bode(E01):/root]
# grep sshd /var/adm/syslog/syslog.log |grep -c SO_KEEPALIVE
4121

[root@bode(E01):/root]
# grep sshd /var/adm/syslog/syslog.log |grep SO_KEEPALIVE|tail -1
Jan 5 11:43:03 bode sshd[21655]: error: setsockopt SO_KEEPALIVE: Invalid argument


Of course I could disable the default KeepAlive setting of sshd to cease the faults.



KeepAlive
Specifies whether the system should send keepalive messages to
the other side. If they are sent, death of the connection or
crash of one of the machines will be properly noticed. However,
this means that connections will die if the route is down
temporarily, and some people find it annoying. On the other
hand, if keepalives are not send, sessions may hang indefinitely
on the server, leaving "ghost" users and consuming server
resources.

The default is "yes" (to send keepalives), and the server will
notice if the network goes down or the client host reboots. This
avoids infinitely hanging sessions.

To disable keepalives, the value should be set to "no" in both
the server and the client configuration files.




But before doing so I would like to know if this release of HP-UX Secure Shell has a known bug in this respect, and if installation of the current release would fix this?

Regards
Ralph
Madness, thy name is system administration
3 REPLIES 3
Ralph Grothe
Honored Contributor

Re: SSH: HP-UX Secure Shell failing stesockopt() syscalls

OK, I upgraded to the latest Secure Shell revision.

# swlist -l fileset -a revision -a title -a install_date T1471AA
# Initializing...
# Contacting target "moldau"...
#
# Target: moldau:/
#

# T1471AA A.03.91.002 HP-UX Secure Shell 200501051409.05
# T1471AA.Secure_Shell A.03.91.002 HP-UX Secure Shell 200501051410.23
T1471AA.Secure_Shell.SECURE_SHELL A.03.91.002 Secure Shell 200501051410.23


I was amazed how seamless this went.
Even while I had been logged in via SSH swinstall reinitialized the sshd without me being kicked out.
swinstall also preserved the existing configuration, and seems to have made backup copies of current configuration files and the new ones (some of sshd's config directives have changed I noticed, e.g. KeepAlive now became TCPKeepAlive)

# swlist -l file T1471AA|grep -F sshd_config
/opt/ssh/etc/sshd_config
/opt/ssh/newconfig/opt/ssh/etc/sshd_config
/opt/ssh/old/opt/ssh/newconfig/opt/ssh/etc/sshd_config
/opt/ssh/share/man/man5/sshd_config.5
/opt/ssh/src/ssh/sshd_config
/opt/ssh/src/ssh/sshd_config.0
/opt/ssh/src/ssh/sshd_config.5


Now I'm curious if the "setsockopt() Invalid argument options still will appear.
Otherwise I will have to set
"TCPKeepAlive no"

Madness, thy name is system administration
Steven E. Protter
Exalted Contributor

Re: SSH: HP-UX Secure Shell failing stesockopt() syscalls

This release was buggy, but HP did their best to fix it when they did the port. Thats what I was told.

I think the first reasonable step toward resolution would be isntallation of the 3.8 version ported on software.hp.com

http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA

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
Steven E. Protter
Exalted Contributor

Re: SSH: HP-UX Secure Shell failing stesockopt() syscalls

I just clicked my own link.

We're at 3.91 now.

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