ssh fatal: buffer_get: trying to get more bytes than in buffer

The issue

You are using ssh to login to a server with ssh key authentication and you get connection closed. On the server you are logging into the syslog shows as messages like

Oct 17 11:30:02 myserver sshd[27687]: [ID 800047 auth.crit] fatal: buffer_get: trying to get more bytes than in buffer

The fix

Check your authorized_keys file on the remote server. Use ssh-keygen -l -f  ~/.ssh/authorized_keys

ssh-keygen -l -f ~/.ssh/authorized_keys
buffer_get: trying to get more bytes than in buffer

The above shows there is at least one  key in your file that is the wrong format – usually because it is  split over several lines rather than being just one long line. (note it could be any key in the file – not the one you are using from your server ) Once you fix the key then confirm with ssh-keygen that all is well – it should return a md5 checksum.
ssh-keygen -l -f authorized_keys
md5 1024 5d:35:7e:ad:3d:e6:70:6d:6f:1d:76:1a:46:ee:c1:c9 authorized_keys

Now retry your ssh access

Configure Sendmail on HPUX to listen on localhost only

Configure Sendmail on HPUX to listen on localhost only

HPUX 11.23

Edit /etc/mail/sendmail.cf  – search for DaemonPortOptions  and set
O DaemonPortOptions=Name=MTA, Addr=127.0.0.1
O DaemonPortOptions=Addr=127.0.0.1, Port=587, Name=MSA, M=E

Restart Sendmail

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Confirm sendmail is only listening on localhost

netstat -an | grep 25
tcp 0 0 127.0.0.1.25 *.* LISTEN

HPUX 11.11,  HPUX 11.00 and HPUX 10.20

Edit /etc/mail/sendmail.cf  – search for DaemonPortOptions  and set
O DaemonPortOptions=Addr=127.0.0.1

Restart Sendmail

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Confirm Sendmail is only listening on localhost

netstat -an | grep 25
tcp 0 0 127.0.0.1.25 *.* LISTEN

HPUX 11.31

cd /usr/newconfig/etc/mail/cf/cf
./gen_cf

1 General Features
8:  Send only

0 Main Menu

5: Generate sendmail.cf

6: Generate submit.cf

9: Create User and Queue for MSP
The group account for smmsp would be
created with the following gid value
gid = 25
>  Do you want to continue and create the group with the above gid
Press any key to continue or [n/N] to change the gid value

Group created Successfully

The user account for smmsp would be
created with the following uid value(recommended).
uid = 2500
>  Do you want to continue and create the user with the above uid
Press any key to continue or [n/N] to change the uid value

User created successfully
Creating Queue dir for MSP: /var/spool/clientmqueue/
Access permissions of /usr/sbin/sendmail is set to 2555
Group ID of /usr/sbin/sendmail is set to smmsp
Press any key to continue

0: Exit from selection

cp sendmail.cf.gen /etc/mail/sendmail.cf
cp submit.cf.gen /etc/mail/submit.cf

vi /etc/mail/sendmail.cf
O DaemonPortOptions=Name=MTA, Addr=127.0.0.1
O DaemonPortOptions=Addr=127.0.0.1, Port=587, Name=MSA, M=E

vi /etc/rc.config.d/mailservs
export SENDMAIL_SERVER=0
export SENDMAIL_SERVER_NAME=
export SENDMAIL_RECVONLY=0
export SENDMAIL_SENDONLY=1

cp sendmail.cf.gen /etc/mail/sendmail.cf
cp submit.cf.gen /etc/mail/submit.cf

vi /etc/mail/sendmail.cf
O DaemonPortOptions=Name=MTA, Addr=127.0.0.1
O DaemonPortOptions=Addr=127.0.0.1, Port=587, Name=MSA, M=E

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Confirm Sendmail is listening on localhost only

netstat -an | grep 25

tcp        0      0  127.0.0.1.25           *.*                     LISTEN