Enable rsh on Mac OS with command line

Source: Internet
Author: User
Tags egrep

1. Enable rsh on MACOs.

1). OS version (10.0)

Enabling the "Allow Remote Login" option turns on telnet, rlogin (remote login), and RSH (Remote Shell) services. you can then connect remotely to your computer by using a client application for any of these services.

2)Mac OS X versions 10.0.1 to 10.1 and later

Enabling telnet, rlogin, and RSH in Mac OS X 10.0.1 and later

Important:Telnet, rlogin, and RSH send information (including passwords) over the network unencrypted. OpenSSH provides greater security. You shocould only revert to telnet, rlogin, and rsh if your network environment requires them.
You must be logged in as an admin user to follow these steps. After each step in which you type a command, press the return key.

1. Open the terminal utility.
2. TypeSudo Pico/etc/inetd. conf
3. type in your admin password.
4. Press return.
5. The file inetd. conf will open in the pico text editor. Using the arrow keys to navigate, scroll down until you see the lines:
# Telnet
# Shell
# Login
6. Remove the pound "#" character from the line of each service you want to re-enable.
7. Save the file (Press Control-O), Press return, and exit Pico (Press Control-x ).
8. Choose Restart From the Apple menu.

When the computer has restarted, the services you enabled shocould be available.

3) If above doesn' t work

Funnily enough, I was trying to get this exact thing working today. the trick it seems, is that you need to have both rshd and rlogind running. here's a step by step which will allow you to get root to rsh into localhost from localhost. expanding this shoshould be easy enough with a little reading. refer to the RSH, rlogin, RCMD and. rhosts manual pages. good luck.

-Download lingon from SourceForge
-Fire it up and open the "shell" plist from the system daemons list.
-Check the Enable checkbox
-Save the plist
-Open the "login" plist from the system daemons list.
-Check the Enable checkbox
-Save the plist

(Note: currectly shell. plist and login. plist were in binary type, you couldn't edit them directly, this can only be edited by lingon, if you didn't installl lingon, you can transfer them to XML format via plutil-convert xml1 file. plist, then edit the XML file)
-Open a terminal window
-Run $ sudo launchctl load/system/library/launchdaemons/shell. plist
-Run $ sudo launchctl load/system/library/launchdaemons/login. plist
-Run $ sudo launchctl list | egrep "RSH | login"
-You will see something like this when they are loaded:

$ sudo launchctl list | egrep "rsh|login"-     0     com.apple.rlogind-     0     com.apple.rshd$- run $ sudo launchctl start com.apple.rshd- run $ sudo launchctl start com.apple.rlogind- run $ sudo launchctl list | egrep "rsh|rlogin"- you will see something like this when it‘s started (loading and starting are two separate things. If you load but don‘t start, it won‘t work. You‘ll know when they are started, because the number in the first column will NOT be zero if the processes are properly started. 0 means they are loaded, >0 means they are started):
$ sudo launchctl list | egrep "rsh|login"608     -     com.apple.rlogind604     -     com.apple.rshd$

-Run sudo SU (don't ask me why, but you cannot sudo the below command, you have to be Su to run it, hence the sudo su ).
-Run 'echo "localhost root">/etc/hosts. equiv'
-Run RSH localhost-And voila:
$ RSH localhost
Last login: Tue Jan 8 23:21:04 on ttys000
Bash $

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.