General
cancel
Showing results for 
Search instead for 
Did you mean: 

Can't remote login from HP to Linux.

SOLVED
Go to solution
Kenny Chau
Trusted Contributor

Can't remote login from HP to Linux.

Hi all,

I am new to Linux. Maybe this question is quite simple to you all.

I had installed RH7.2 server version. I had tried to do a remote login (root account) or remote shell from HP-UX to Linux but failed. I had comment the line of "#auth required /lib/security/pam_securetty.so" from files login, rlogin and rexec but when I do a remsh linux from the HP-UX, it prompts me for password. I had modified that I can login root from telnet in Linux. May I know what files I had missed out that gives me this result?
Before I comment those lines, it prompts me twice for password. But after I comment those lines, it prompt me once for password.

The other way round, I can rsh from Linux to HP-UX by root account.

Thanks in advance.
Kenny.
Kenny
12 REPLIES
I_M
Honored Contributor

Re: Can't remote login from HP to Linux.

Hi,

To do pam related troubleshoot,
I advice you to add "debug" option after pam.securetty.so.
Then you will be able to see error message in your /var/log/messages.

Good luck
Kenny Chau
Trusted Contributor

Re: Can't remote login from HP to Linux.

Thanks for your reply, but how can I enable the debug mode in this situation?

Thanks again.
Kenny.
Kenny
MiQUET Pascal
Occasional Advisor

Re: Can't remote login from HP to Linux.

You should notice that the root login normaly is not allowed. I'd suggest to use ssh.

Another solution is to login (rlogin or telnet) as a regular user and then "su - root" to get the root privileges.

HTH
Kenny Chau
Trusted Contributor

Re: Can't remote login from HP to Linux.

Well, I know I can su to root from other users, but I need to remote copy some root priviledge files and directories from HP-UX to Linux. I know I can do the other way round, but there are several people know the Linux root password but not the HP-UX root password. So I need to restrict rsh from Linux to HP-UX but not HP-UX to Linux.
Any idea to solve this problem?

Thanks.
Kenny.
Kenny
Hal Rottenberg
Frequent Advisor

Re: Can't remote login from HP to Linux.

If all you want to do is remote copy and you are having password issues--then don't use passwords. Use SSH and create a key for this purpose. You can create the key without a password, although that is a security risk. If you protect the access to the key it's probably less of a security risk than using the old r* commands...
If at first you don't succeed, then skydiving isn't for you.
Hal Rottenberg
Frequent Advisor

Re: Can't remote login from HP to Linux.

I forgot to mention one more thing. Check out scp(1).
If at first you don't succeed, then skydiving isn't for you.

Re: Can't remote login from HP to Linux.

Kenny-
I can tell you have the services active on the linux box or you would not get as far as you did. The magic file you are looking for is /root/.rhosts on the linux box. The file structure is a list of the system names that are permitted to access your system. I recommend using the full name of the system you want to allow access from. ie- if the name of a system is: "xyzsys.mydomain.com" use that name in the file not the alias of "xyzsys". My .rhosts file has both names. You may also need to create the file as /etc/hosts.equiv for some file transfers as a user account other than root, but this should put you on the right path.

Try man hosts.equiv

Kenny Chau
Trusted Contributor

Re: Can't remote login from HP to Linux.

Hal, I know I can use SSH, but this is a testing machine and we don't want to buy any SSH license and install to this linux.
Robert, I think you may right, but I am not sure how to find a full name of my HP-UX server and from the configuration file, I can only find the hostname. So any clue to this?

Thanks.
Kenny.
Kenny
S. Kaysersberg
Occasional Advisor

Re: Can't remote login from HP to Linux.

Hey Kenny,

you can use openssh, its under the GPL (no cost ...) www.openssh.org

To get your hostname. just type #hostname

Greetz
Kayse
Angus Crome
Honored Contributor
Solution

Re: Can't remote login from HP to Linux.

Have you turned on rsh and rlogin in xinetd?
If not, you are not going to get in. I believe the files you want are in /etc/xinetd.d

You should make sure that the configs for rlogin and/or rsh (whichever you use) are set with disable=no

Even though it says default on in the comment under Red Hat 7.2 (my default installation had them set as disable=yes).

You will still need the hosts.equiv or .rhosts files to do it without password though (and of course this is not recommended for security reasons).
There are 10 types of people in the world, those who understand binary and those who don't - Author Unknown
Kenny Chau
Trusted Contributor

Re: Can't remote login from HP to Linux.

Thanks Angus, you are right, I had missed the file rsh in the /etc/xinetd.d. Thanks for reminding me.

Regards,
Kenny.
Kenny
Peter Kloetgen
Esteemed Contributor

Re: Can't remote login from HP to Linux.

Hi Kenny,

something more that can cause an error:

/etc/securetty

this file has to be renamed/removed to get this to work.

/etc/xinetd.d -->vi the desired service, change disable="yes" to "no"

--> restart xinetd

That should do it for you.

Allways stay on the brigth side of life!

Peter
I'm learning here as well as helping