Operating System - HP-UX
1836995 Members
2102 Online
110111 Solutions
New Discussion

Re: Error "rcmd: Lost connection"

 
SOLVED
Go to solution
burhan_1
New Member

Error "rcmd: Lost connection"

Hi all !

There is a connection/setup issue with our rp-4440 machine running under HP-Ux-11. We can not do a "remsh/rlogin" to this machine, as evident from the following error:

# rlogin localhost
rcmd: Lost connection

# remsh localhost
rcmd: Lost connection

However, a similar machine with the same hardware and network configuration allows "remsh/rlogin".

Any help will be appreciated. Thanks !
9 REPLIES 9
Asif Sharif
Honored Contributor

Re: Error "rcmd: Lost connection"

Hi Burhan,
"rcmd: Lost connection" means the remote hosts did not accept socket request

Check /var/adm/syslog/syslog.log for any messages related to rcp.
ps -ef|egrep -i 'remsh|rlogin|rexec|rsh'
netstat -an | grep -i 513
netstat -an | grep -i 514

Regards,
Asif Sharif
Regards,
Asif Sharif
Muthukumar_5
Honored Contributor

Re: Error "rcmd: Lost connection"

Can you check this:

# grep 'remote' /etc/services
# grep 'rlogin' /etc/inetd.conf

Are they being without comment?
/etc/inetd.conf

login stream tcp nowait root /usr/lbin/rlogind rlogind
klogin stream tcp nowait root /usr/lbin/rlogind rlogind -K

/etc/services
exec 512/tcp # remote execution, passwd required
login 513/tcp # remote login
who 513/udp whod # remote who and uptime
shell 514/tcp cmd # remote command, no passwd used

Else configure accordingly and reconfigure inetd as,

# inetd -c

--
Muthu
Easy to suggest when don't know about the problem!
burhan_1
New Member

Re: Error "rcmd: Lost connection"

Thanks for the quick reply, Asif. Here is what u asked for:

Check /var/adm/syslog/syslog.log for any messages related to rcp.
- No such messages were found in syslog.log

netstat -an | grep -i 513
- tcp 0 0 *.513 *.* LISTEN

netstat -an | grep -i 514
- tcp 0 0 *.514 *.* LISTEN
udp 0 0 *.514 *.*
50083b80 stream 0 0 0 507e5140 0 0

Asif Sharif
Honored Contributor
Solution

Re: Error "rcmd: Lost connection"

Burhan,

Please check /etc/inetd.conf file.how many remsh and rlogin? if yes, then there only show

kshell stream tcp nowait root /usr/lbin/remshd remshd -K
klogin stream tcp nowait root /usr/lbin/rlogind rlogind -K

if you have

shell stream tcp nowait root /usr/sbin/tcpd in.rshd
login stream tcp nowait root /usr/sbin/tcpd in.rlogind

comment them & after that run this command 'inetd -c'

Then check rlogin hostname and see the /var/adm/syslog/syslog.log file.

Regards,

Asif Sharif
Regards,
Asif Sharif
Muthukumar_5
Honored Contributor

Re: Error "rcmd: Lost connection"

what is there in /var/adm/inetd.sec file login service? Can you post as,

# grep -Ev '^#|^$' /var/adm/inetd.sec

Some entries are there to block.

--
Muthu
Easy to suggest when don't know about the problem!
burhan_1
New Member

Re: Error "rcmd: Lost connection"

Muthu, thanks, here is the output:

# grep -Ev '^#|^$' /var/adm/inetd.sec
dtspc allow 127.0.0.1 loopback testsrv2
Asif Sharif
Honored Contributor

Re: Error "rcmd: Lost connection"

burhan_1
New Member

Re: Error "rcmd: Lost connection"

Asif, Muthu, the problem has been solved, Thanks for the help. I did the following:

1. Commented the following lines in /etc/inetd.conf

shell stream tcp nowait root /usr/sbin/tcpd in.rshd
login stream tcp nowait root /usr/sbin/tcpd in.rlogind

2. Reconfigured inetd as,
# inetd -c

Regards n thanks again,
Burhan.
burhan_1
New Member

Re: Error "rcmd: Lost connection"

Thanks everybody !