Operating System - Linux
1830136 Members
2950 Online
109999 Solutions
New Discussion

rsh and rcp problems on Linux and HP-UX

 
SOLVED
Go to solution
Gadi
Advisor

rsh and rcp problems on Linux and HP-UX


Hi,

I installed Linux RedHat 6.2 on 4 PCs.

I have HP 10.20 WorkStations. remsh and
rcp are working OK on it, but when I try
remsh from HP to Linux station or rcp I
get the msg.: "Permission denied".
(.rhosts exists and '+' inside it)

For rcp from Linux to Linux I get the msg.:
"Connection refused
Trying krb4 rcp...
Connection refused
trying normal rcp (/usr/bin/rcp)
Permission denied."


For rcp from Linux to HP I get the msg.:
"Trying krb4 rsh...
krb_senddauth failed: You have no tickets cached
trying normal rcp (/usr/bin/rcp)"

The file copied OK.

rsh acts as rlogin when no command aplys.

Can you help me?
10 REPLIES 10
Evert Jan van Ramselaar
Valued Contributor

Re: rsh and rcp problems on Linux and HP-UX

Have you tried putting the FQDN from the remote system in the .rhosts on both the remote and the local machine?

Evert Jan
Contrary to popular belief, Unix is userfriendly. It just happens to be selective about who it makes friends with.
Gadi
Advisor

Re: rsh and rcp problems on Linux and HP-UX

Thank you Evert Jan van, but what is FQDN?
Kofi ARTHIABAH
Honored Contributor

Re: rsh and rcp problems on Linux and HP-UX

Hi:

FQDN = fully qualified domain name - the name of the server including its domain name (eg. xyz.hp.com is the fully qualified domain name of xyz)

Okay, you might want to check the following:
1. ensure that you have both the short name and the FQDN in your ~/.rhosts files
2. You might also want to include the IP address (just incase the name is not resolvable)
3. check your /etc/nsswitch.conf to ensure that you have the appropriate entry for hosts

eg/

hosts: files [NOTFOUND=continue] dns

this tells the system to first try your /etc/hosts files for the IP address given the name of the server - if that fails, it should go on to the DNS server with a query.
4. Check that your resolver is properly set up (/etc/resolv.conf)
- use nslookup to check.

Good luck
nothing wrong with me that a few lines of code cannot fix!
Jiri Furst
Advisor

Re: rsh and rcp problems on Linux and HP-UX

Did you install rsh-server package?
Starting from 6.2 RedHat decided to split rsh onto two parts: rsh and rsh-server.
The rsh-server package is needed if you want to connect from another computer to your LINUX box.

The same is true for telnet, talk etc.
Gadi
Advisor

Re: rsh and rcp problems on Linux and HP-UX

Hello to all,

I installed everithing from the
install CD except the kerberos pack.

I know that rsh is working, but its
fail on permision problem.
I thing that I need to define or to config
some secure files, but I don't know what
and which files.
Jerome Fenal_1
Valued Contributor
Solution

Re: rsh and rcp problems on Linux and HP-UX

Which user are you on the HP box ? root ?
Ok, if root, did you comment out the securetty line in /etc/pam.d/rlogin file ?

(...)
#auth required /lib/security/pam_securetty.so
(...)

You have two other files where to do that :
rexec and login if want to allow root login from elsewhere than the console.

But, BE CAREFUL, this lessens the overall security level of your Linux box.

Regards,

Jerome
Bienvenue chez moi
Jerome Fenal_1
Valued Contributor

Re: rsh and rcp problems on Linux and HP-UX

Have a look on thread "remsh from HPUX is ok, but rlogin does not work", by Hermann Merz, posted here on 06/26/00.

Maybe is it the same problem.
Bienvenue chez moi
Gadi
Advisor

Re: rsh and rcp problems on Linux and HP-UX

Hi,

First I want to thank all off you.

After I replaced the '+' by the names of
the stations in .rhosts the remsh
was working OK from the HP Unix to Linux,
but rsh was failed on permision access
from the Linux to Linux and From
Linux to HP.

Because I was under time pressure
I installed Linux RH ver 6.1.
Now remsh and rsh are working OK from
the both sides.

In the near future I'll try again
to work with RH 6.2.
So don't give up.
Ravi Cheema
Occasional Contributor

Re: rsh and rcp problems on Linux and HP-UX

rename /etc/securetty to something else, this will allow all tty terminals to access linux.

in /etc/pam.d/rexec and /etc/pam.d/rsh files comment the line
#auth required /lib/security/pam_nologin.so
Krishna Prasad
Trusted Contributor

Re: rsh and rcp problems on Linux and HP-UX

I have installed openssh on my HP-UX 11.0 machines. I use ssh and scp instead of rcp and remsh/rlogin.

It is more secure and uses certificates. There is also openssh for Windows platforms which will allow all your OS's to talk to each other!

I am not sure if it is available for 10.20.

Here are the steps for 11.o


Installation for Open-ssh on HP-UX 11.0
Required User
You will need a sshd user setup for the system when using version 3.4.
The following is the entry needed in the passwd file.
sshd:*:22:22:"sshd":/var/empty:/bin/false

Required Software
The following two depots must be installed on the server
TWWzlib11.depot - This installs the zlib library. This does not require a reboot
openssh-3.4p1-sd-11.00.depot - This installs the ssh server and client.

The above depots can be installed by running the following command

swinstall -s /path/TWWzlib11.depot
swinstall -s /path/openssh-3.4p1-sd-11.00.depot /path is the directory where the depot is located.

The next step is to create a soft link for the libz library

ln -s /opt/TWWfsw/zlib11/lib/libz.sl /usr/local/lib/libz.sl

The following steps sets-up the automatic startup sshd at boot time.

- Create or Copy a startup config file for openssh.
If you bring down the source code from the website it provides example files. * Note the source code was un-tared but never compiled
a software depot was used to install the product.

The config files should be - /etc/rc.config.d/sshd

- Copy the startup script to the /sbin/init.d directory.
There was an example script from the source code tar file.
The startup script is named sshd.rc

- Create the softlinks for automatic startup at boot.
cd /sbin/rc1.d
ln -s /sbin/init.d/sshd.rc K100sshd

cd /sbin/rc2.d
ln -s /sbin/init.d/sshd.rc S900sshd

The next step is to create the RSA1, RSA2, and DSA host keys for openssh.

- Do the following commands

RSA1 key

/usr/local/bin/ssh-keygen -t rsa1

You will be prompted where you want the key.
for rsa1 option enter the following when prompted

/usr/local/etc/openssh/ssh_host_key

This will create the RSA1 public and private key in the /usr/local/etc/openssh directory.


RSA2 key

/usr/local/bin/ssh-keygen -t rsa

You will be prompted where you want the key.
for rsa2 option enter the following when prompted

/usr/local/etc/openssh/ssh_host_rsa_key

This will create the RSA2 public and private key in the /usr/local/etc/openssh directory.

DSA key

/usr/local/bin/ssh-keygen -t dsa

You will be prompted where you want the key.
for dsa option enter the following when prompted

/usr/local/etc/openssh/ssh_host_dsa_key

This will create the DSA public and private key in the /usr/local/etc/openssh directory.

- The next step is to create a sshd user. The sshd user is required in the new 3.4 openssh version

- The final step is to create a directory that openssh will use.
mkdir /usr/local/var
mkdir /usr/local/var/empty

chmod 755 /usr/local/var/empty

The openssh server can be started by running the startup script

/sbin/init.d/sshd.rc start



Positive Results requires Positive Thinking