Enable rsh on MAC OS with command line

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

时间: 2024-10-26 16:26:28

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

Mac OS X Command Line

关于 man 命令 虽然有上千条命令,每条命令还有许多可选参数和具体的使用方式,但是你却不需要记住这些命令.你只需要记住一个:man 大多数命令都会包含一个使用指南,会告诉你任何你需要知道的关于这个命令的所有细节,在命令行中输入 man command-name 即可获取.例如,你想知道ls这个命令怎么使用,输入man ls即可进入使用指南页面. 使用指南往往很长,所以你可以使用▲(上箭头)或▼(下箭头)来上下移动,使用 来翻页,输入/和关键字来按照关键字搜索,按Q来退出使用指南页面. 那么——

An A-Z Index of the Apple OS X command line

来源:http://ss64.com/osx/ An A-Z Index of the Apple OS X command line alias Create an alias • alloc List used and free memory apropos Search the whatis database for strings asr Apple Software Restore awk Find and Replace text within file(s) b basename

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

原文链接:Eight Terminal Utilities Every OS X Command Line User Should Know OS X  的Terminal 终端开辟了强大的UNIX实用工具和脚本的世界.如果你是从Linux转移过来的用户,你会在OS X 终端上发现很多熟悉的命令.但是即使是高级用户也经常会忽略掉其实OS X终端也会有一系列在其他的操作系统中没有的终端工具.当你学习了以下这些只适用于Mac的课程会让你更高效的使用Mac命令行同时消除UNIX系统和你的Mac系统之间

mac os x 命令+10个常用命令行工具

很多朋友对osx下的命令行操作挠头,估计多数是在windows时代开始接触计算机的.有dos基础的应该是看看就 明白,而玩过Linux的应该是轻车熟路了.这个贴子希望能给见到命令行就头大的兄弟一些帮助,所涉及到的命令基本限于安装kext,修改plist,更 换核心 所碰到的操作.如果想进一步了解Unix的命令,再网上找些关于Linux命令的文章看,有很多.高手们就免看了,不过希望能来挑挑毛病,再来补充两句... ------------------------------------------

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

刚开始接触linux有些不适应,走了不少弯路,一直没有系统的学过linux应用,基本都是零零散散Google出来的知识,在这里做个整理: Vi/Vim 基本操作: 刚开始接触linux时,不懂vi吃了不少亏.在命令行状态下,一旦用vi打开了文本只能通过重启来退出. vi/vim 分三种模式: 指令模式,编辑模式,选择模式. 只有在编辑模式下才能进行输入(不是绝对). 默认是"指令模式", 这个模式只支持vi/vim的指令, 在敲键盘时只会滴滴响. 不知道有多少人被这种方式搞晕过(晕不晕

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

查看环境变量: $ echo $PATH $ /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 创建软链接: $ sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl OS X Command Line

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

打开终端输入:xcode-select --install 回车 安装好了测试结果:gcc -v 显示如下: xcode-select: note: install requested for command line developer tools apple-1tekiiMac:~ apple-1$ gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-includ

OS X 10.9 Mavericks下如何安装Command Line Tools(命令行工具)

OS X 10.9 Mavericks正式发布,免费更新,立即去更新看看效果. 不过升级后安装命令行工具(Command Line Tools)时发现官网没有clt的下载安装包了,原来改了,使用命令在线安装. 打开终端,输入命令:xcode-select --install 选择“安装”,然后同意安装协议. OS X 10.9 Mavericks下如何安装Command Line Tools(命令行工具)

mac, xcode 6.1 安装command line tools 支持,autoconf,automake等

以下软件包 都去我的环境库找到 1 先安装 tcl库 2 安装macports /opt/local/bin/port 一般装到这里 安装autoconf时提示: Warning: The Xcode Command Line Tools don't appear to be installed; most ports will likely fail to build. Warning: Install them by running `xcode-select --install'.