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 should 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. Type sudo 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 for:
#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 should 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 should 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.rlogind
604     -     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$

Enable rsh on MAC OS with command line的更多相关文章

  1. 0821找不到Command Line Utility的解决方案

    在Object-C基础教程中写到,要求选择Xcode中Mac OS X - Command Line Utility - Foundation Tool 但在Xcode4.5中Mac OS X中没有C ...

  2. Installing Apache, PHP, and MySQL on Mac OS X

    I have installed Apache, PHP, and MySQL on Mac OS X since Leopard. Each time doing so by hand. Each ...

  3. 8个不可不知的Mac OS X专用命令行工具【转】

    OS X的终端下通用很多Unix的工具和脚本.如果从Linux迁移到OS X会发现很多熟悉的命令和脚本工具,其实并没有任何区别. 但是OS X也提供了很多其他系统所没有的特别的命令行工具.我们推荐8个 ...

  4. 转:值得收藏!那些鲜为人知的 Mac OS X 技巧

    看到一篇网友整理的比较好的“那些鲜为人知的 Mac OS X 技巧”,转载过来分享给大家!希望能有帮助. 更多专题,可关注小编[磨人的小妖精],查看我的文章,也可上[风云社区 SCOEE],查找和下载 ...

  5. Mac OS X 命令行用户应当知道的八个终端工具

    原文链接:Eight Terminal Utilities Every OS X Command Line User Should Know OS X  的Terminal 终端开辟了强大的UNIX实 ...

  6. Linux/Mac OS 个人常用Terminal技巧整理

    刚开始接触linux有些不适应,走了不少弯路,一直没有系统的学过linux应用,基本都是零零散散Google出来的知识,在这里做个整理: Vi/Vim 基本操作: 刚开始接触linux时,不懂vi吃了 ...

  7. 在Mac OS终端的Terminal 中使用Sublime Text3

    查看环境变量: $ echo $PATH $ /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 创建软链接: $ sudo ln -s /Application ...

  8. Xcode Command Line Tools for Mac OS X 10.9 Mavericks

    by Daniel Kehoe Last updated 28 December 2013 How to install Apple Xcode Command Line Tools for Mac ...

  9. MAC OS 如何安装命令行工具:Command Line Tools

    打开终端输入:xcode-select --install 回车 安装好了测试结果:gcc -v 显示如下: xcode-select: note: install requested for com ...

随机推荐

  1. tensorflow版的bvlc模型

    研究相关的图片分类,偶然看到bvlc模型,但是没有tensorflow版本的,所以将caffe版本的改成了tensorflow的: 关于模型这个图: 下面贴出通用模板: from __future__ ...

  2. wmic 命令的一个汇总,功能很强大

    获得系统版本信息wmic datafile where Name='c:\\windows\\explorer.exe' get Manufacturer,Version,Filename 获得系统进 ...

  3. occ添加新的捕捉模式

    Load (theSelection, theShape, theType, theDeflection, theDeviationAngle, isAutoTriangulation, thePri ...

  4. 关于app的具体实施

    鉴于我们小组做的app是关于在线做题和游戏相融合的,所以,我会先学习UI设计,毕竟好的UI设计不仅会给用户耳目一新的体验,同时还会让用户愿意去包容一些小BUG,但如果你的软件做的非常好,功能提供的很全 ...

  5. 安装LoadRunner提示缺少vc2005_sp1_with_atl..

    装自动化负载测试工具LoadRunner前,需要预先安装其运行的基础环境.如:安装LoadRunner 11时就需要先安装Micrsoft Visual C++ 2005 SP1.C++ 2008运行 ...

  6. 在代码设置RelativeLayout的属性,比如layout_below

    ( (RelativeLayout.LayoutParams)holder.ivLvDivider.getLayoutParams()).addRule(RelativeLayout.BELOW, R ...

  7. RMAN 前期准备工作和实例

    理解恢复目录,RMAN可以在没有恢复目录(NOCATALOG)下运行,这个时候备份信息保存在控制文件.保存在控制文件的备份信息是很危险的,如果控制文件的破坏将导致备份信息的丢失与恢复的失败,而且,没有 ...

  8. react验证码倒计时

    <!DOCTYPE html> <html> <head> <script src="../build/react.js">< ...

  9. MRPT笔记——使用编译好的MRPT库建立VS2013项目

    接着上一篇<MRPT在VS2013中的配置>,下面接收如何使用编译好的MRPT建立工程项目. 一.设置环境变量 上一篇中,配置MRPT时,使用到了几个相关库,opencv.zlib.wxW ...

  10. C# ADO.NET 连接Sybase 数据库

    using Sybase.Data.AseClient;//反编译修改后的DLL public class SybaseHelper { public AseConnection con; publi ...