Operating System - HP-UX
1835960 Members
1651 Online
110088 Solutions
New Discussion

remsh and the port number ?

 
SOLVED
Go to solution
Abdul Majeed Lardhi
Regular Advisor

remsh and the port number ?


Hi

Which port number used by remsh ???

I open port 514 in the firewall according to the /etc/services but I think its the wrong one ?

Regards
Abdul Majeed
9 REPLIES 9
Abdul Majeed Lardhi
Regular Advisor

Re: remsh and the port number ?



Sorry, I found it 513 !!!

but the /etc/services gives wrong indication

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
syslog 514/udp # remote system logging
printer 515/tcp spooler # remote print spooling
Ranjith_5
Honored Contributor

Re: remsh and the port number ?

Hi Abdul,

The remshd is a part of inetd services and hence the inetd daemon invokes remshd if a service request is received at ports indicated by shell or kshell services specified in /etc/services. By default the port numbers are

shell 514/tcp cmd # remote command, no passwd used
kshell 544/tcp krcmd # Kerberos remote shell -kfall

Try looking at the port number 514.


Regards,
Syam
Sยภเl Kย๓คг
Respected Contributor

Re: remsh and the port number ?

Hi,

Default port no of rmsh is 514 only. If u have already opened the port in firewall and still u are not able to do it, check wether the service is enabled in your system or no, check /etc/inetd.conf for
shell stream tcp nowait root /usr/lbin/remshd remshd entry, it should be enabled and the remshd daemon should be running.

Regards,
Sunil
Your imagination is the preview of your life's coming attractions
Sยภเl Kย๓คг
Respected Contributor

Re: remsh and the port number ?

Sorry missed out
kshell stream tcp nowait root /usr/lbin/remshd remshd -K
entry too, it shouldn't be hashed out.
regards,
Sunil
Your imagination is the preview of your life's coming attractions
Abdul Majeed Lardhi
Regular Advisor

Re: remsh and the port number ?


Hi,

I think I told in the begining the correct port is 513 not 514.

once I opend 513 in the firewall it went thru

regards
Abdul Majeed
Muthukumar_5
Honored Contributor

Re: remsh and the port number ?

For remsh it is 514 only. You can check in the machine as,

# remsh -l root localhost -n "sleep 1000" &
# netstat -na | grep 514

You have to open all ports related with r* commmands like rlogin, remsh, rexec and rcp.

512, 513 and 514 are related with r* commands.

hth.
Easy to suggest when don't know about the problem!
Abdul Majeed Lardhi
Regular Advisor

Re: remsh and the port number ?


Hi,

I found that :
1) if you use just "remsh hostname", this will require rlogin which 513 means you have to open 513 on the other host
2) if you use "remsh hostname cmd", this will require 514 means you have to open 514 on the other host but also you have to open 1021 and 1022 on the local host as well

regards
AML
Muthukumar_5
Honored Contributor
Solution

Re: remsh and the port number ?

1) if you use just "remsh hostname", this will require rlogin which 513 means you have to open 513 on the other host

>>>

Yes correct. remsh hostname is nothing but rlogin hostname. Refer remsh man page. So it is using 513 port.

2) if you use "remsh hostname cmd", this will require 514 means you have to open 514 on the other host but also you have to open 1021 and 1022 on the local host as well

>>>

Yes. remsh hostname cmd will require 514 port. I don't think 1021 and 1022 is needed? what is there in /etc/services for 1021 and 1022 in your server? check with netstat -na | grep -E '1021|1022|514' and post the results also.

hth.

Easy to suggest when don't know about the problem!
remsh and the port
New Member

Re: remsh and the port number ?

Hi
If execut remsh(tcp514)on Host A, Host A source port will be tcp1020 > tcp1024 so remote Host has to repond back to Host A´s source port.

Firewall setting should be


A ---> B tcp514(remsh) accept
B ---> A tcp1020-tcp1024 accept