Rsh passwordless entry


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Rsh passwordless entry
# 1  
Old 02-11-2014
Rsh passwordless entry

Hello guys,

I am trying to get rsh between 2 ubuntu 12.04 servers.

as of now I have installed rsh-server, xinetd
I have made entries of hosts in the /etc/hosts
entered host-names in /etc/hosts.allow, .rhosts, /etc/hosts.equiv

Firewall is flushed, no rules.

I can't for the love of god find a proper documentation on how to go about doing this. Also I want to avoid using ssh-keygen at the moment.
I appreciate any help I can get.
Thank you
# 2  
Old 02-11-2014
sshd service enables
Code:
rsh remotehost command

and rcpfrom and to the remotehost.
NB interactive login
Code:
rsh remotehost

is rlogin, a different service/port that requires rlogind.
# 3  
Old 02-11-2014
You need to open a simple telnet session from A to B first, then look at where the login is from:-
Code:
ServerA telnet ServerB
Login: username
Password: password

Welcome to ServerB!

ServerB who am i
username    pts/t0    aaa.bbb.ccc.ddd

Now you can use this information as it is displayed. Hopefully aaa.bbb.ccc.ddd is a name rather than an IP address as you have included it in /etc/hosts (ServerB will have done a lookup) but really all you need to do is to add the address into your .rhosts file in your home directory rather than the global /etc/hosts.equiv which permits wider access. Esure that this file is RW to yourself and no-one else:-
Code:
ServerB chmod 700 .rhosts

Then exit the telnet session to ServerB and from ServerA again, try:-
Code:
ServerA rsh ServerB hostname

Hopefully it will display the hostname of ServerB and you can then try variations on the command. Quoting and knowing which shell with expand metacharacters or interpret variables can be quite tricky though.

Have a go and let us know how you get on. I hope that this helps.

If you still can't get on, check that the port is listening. You are after ports 513 & 514. If they are not listening, you may have to alter /etc/xinet.d/* to make sure that they are not disabled. Do not save backup versions of these files in the same directory or they will be considered live too, which can get messy - he says from experience Smilie


Robin
Liverpool/Blackburn
UK
# 4  
Old 02-14-2014
telnet connection is refused.

I am able to rsh with password.
Code:
who am i

shows the hostname that I am connected to.

I have added entries in /etc/securetty "rsh and rlogin"

ports 513 and 514 are not listening.

There is no service like rsh and isn't rsh controlled by xinetd
so if I start xinetd rsh should start? and I did start it, but still rsh without password did not work.

Any ideas? Smilie

Last edited by br1an; 02-14-2014 at 05:24 PM..
# 5  
Old 02-17-2014
Please don't be mad Smilie, we're all trying to help.

I thought that /etc/securetty was a list of terminals that would accept a root login. I'm not sure how you have 'added entries' for rsh & rlogin. Please explain and I may learn something too.

I was under the impression that xinetd does indeed control rsh server (alias rexec) and rlogin. Have a look in /etc/xinetd.d and you should find a file for each. There will be a statement within each to disable the service. You will need to set it to no and restart xinetd with service xinetd restart Maybe it's ports 512 & 513 rather than 513 & 514.



Regards,
Robin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to replace multiple "&nbsp;" entry with in <td> tag into single entry using sed?

I have the input file like this. Input file: 12.txt 1) There are one or more than one <tr> tags in same line. 2) Some tr tags may have one <td> or more tna one <td> tags within it. 3) Few <td> tags having "<td> &nbsp; </td>". Few having more than one "&nbsp;" entry in it. <tr> some td... (4 Replies)
Discussion started by: thomasraj87
4 Replies

2. How to Post in the The UNIX and Linux Forums

Help me, write a bash script to delete parent entry with all their child entry in LDAP UNIX server

Hi All, Please help me and guide me to write a bash/shell script on Linux box to delete parent entry with all their child entries. example: Parent is : ---------- dn: email=yogesh.kumar@wipro.com, o=wipro, o=in child is: ---------- dn: cn: yogesh kumar, email=yogesh.kumar@wipro.com,... (1 Reply)
Discussion started by: Chand
1 Replies

3. Solaris

Passwordless connections

Hi All! Please help me with this situation: I have 3 servers configured with the following network 10.100.48.xx and I have configured on the passwordless connection, and it is working fine. Now the app vendor ask me to configure a 2nd IP address on each of the 3 servers with a different IP... (4 Replies)
Discussion started by: fretagi
4 Replies

4. UNIX for Advanced & Expert Users

Passwordless ssh

Hi I have created a user on a linux server and created a passwordless ssh key. I've echoed the key into the authorized_keys file for the user. I've added a series of forced commands to the key. From my laptop - logged in as myself - I can ssh into the server as that user and the commands... (3 Replies)
Discussion started by: steadyonabix
3 Replies

5. AIX

passwordless entry using ssh from one user to a different user on the same server

Hi, We have a requirement to do passwordless entry from one user to a different user on the same AIX server using ssh keys. Can some one help me with this? Thanks in advance, Panditt (3 Replies)
Discussion started by: deshaipet
3 Replies

6. Shell Programming and Scripting

passwordless ssh

My main concern is, i have to login into 300 linux server and all are having same userid and password. I dont want to create any key for each server to login . Is there a way to run the shell script ? (3 Replies)
Discussion started by: Mani2512
3 Replies

7. Shell Programming and Scripting

su -m <user> passwordless?

Hi! I am working on mac osx and have a script which prompts for password for a non-root user, can I avoid that? su -m <user> Prompts for a password. Its a startup script and the start up fails? How can I fix this? Thanks, Jack. (4 Replies)
Discussion started by: jacki
4 Replies

8. UNIX for Dummies Questions & Answers

passwordless ssh

hi, i have tried with passwordless shh in google.. i followed the below steps ... user:~> ssh-keygen -t rsa Enter file in which to save the key (/home/cantin/.ssh/id_rsa):key.txt Enter passphrase (empty for no passphrase): Enter same passphrase again: till this step i... (0 Replies)
Discussion started by: arunmanas
0 Replies

9. HP-UX

Help on passwordless ssh...

Hi, Can someone help me on ssh-keygen usage...? I used ssh-keygen after which "id.pub" file was generated in system1's > .ssh directory... I copied the same into the remote system system2 > .ssh directory as "authorized_keys" file. Now i tried ssh connection from system 1 to system... (7 Replies)
Discussion started by: EmbedUX
7 Replies

10. Shell Programming and Scripting

Passwordless SFTP

Hi, When Iam trying to do SFTP it is asking for password everytime. Can I have any alternative where I can provide the password in script itself. Because there are some control-M jobs which runs without user interaction. So please let me know the script where we can provide the password in the... (2 Replies)
Discussion started by: manneni prakash
2 Replies
Login or Register to Ask a Question