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"
- run $ sudo launchctl start com.apple.rshd
- 0 com.apple.rlogind
- 0 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的更多相关文章
- 0821找不到Command Line Utility的解决方案
在Object-C基础教程中写到,要求选择Xcode中Mac OS X - Command Line Utility - Foundation Tool 但在Xcode4.5中Mac OS X中没有C ...
- 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 ...
- 8个不可不知的Mac OS X专用命令行工具【转】
OS X的终端下通用很多Unix的工具和脚本.如果从Linux迁移到OS X会发现很多熟悉的命令和脚本工具,其实并没有任何区别. 但是OS X也提供了很多其他系统所没有的特别的命令行工具.我们推荐8个 ...
- 转:值得收藏!那些鲜为人知的 Mac OS X 技巧
看到一篇网友整理的比较好的“那些鲜为人知的 Mac OS X 技巧”,转载过来分享给大家!希望能有帮助. 更多专题,可关注小编[磨人的小妖精],查看我的文章,也可上[风云社区 SCOEE],查找和下载 ...
- Mac OS X 命令行用户应当知道的八个终端工具
原文链接:Eight Terminal Utilities Every OS X Command Line User Should Know OS X 的Terminal 终端开辟了强大的UNIX实 ...
- Linux/Mac OS 个人常用Terminal技巧整理
刚开始接触linux有些不适应,走了不少弯路,一直没有系统的学过linux应用,基本都是零零散散Google出来的知识,在这里做个整理: Vi/Vim 基本操作: 刚开始接触linux时,不懂vi吃了 ...
- 在Mac OS终端的Terminal 中使用Sublime Text3
查看环境变量: $ echo $PATH $ /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 创建软链接: $ sudo ln -s /Application ...
- 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 ...
- MAC OS 如何安装命令行工具:Command Line Tools
打开终端输入:xcode-select --install 回车 安装好了测试结果:gcc -v 显示如下: xcode-select: note: install requested for com ...
随机推荐
- Java双循环break的用法
break只跳出当前循环,也就是内循环,如果想跳出外循环有两种办法:1:for(int i = 0;i<9;i++){ //用两个breakfor(int j = 0;j<8;j++){b ...
- caffe安装过程中遇到的问题以及解决方法
1. 在安装依赖库的时候,遇到: @gxjun-Latitude-E5440:~$ sudo apt-get install libatlas-base-dev 正在读取软件包列表... 完成 正在分 ...
- VS2010 验证时出错。HRESULT = '8000000A'
验证时出错.HRESULT = '8000000A' 在VS2010中,当为Windows窗体应用程序添加一个安装项目后,如果项目生成时出现以下错误: 验证时发生错误.HRESULT = '80000 ...
- 《精通C#》第十六章-动态类型和动态语言运行时-第一节至第四节
在.Net4.0中引入了一个关键字dynamic,这是一个动态类型关键字.Net中还有一个关键字是var,这是一个隐式类型,可以定义本地变量,此时var所代表的实际的数据类型有编译器在初次分配时决定, ...
- 学习PYTHON之路, DAY 6 - PYTHON 基础 6 (模块)
一 安装,导入模块 安装: pip3 install 模块名称 导入: import module from module.xx.xx import xx from module.xx.xx impo ...
- ThinkPHP 3.2.3(二)配置
一.配置格式 1.PHP数组定义 默认所有配置文件的定义格式均采用返回PHP数组的方式,配置参数不区分大小写. 如果使用二维数组来配置更多的信息,则二级参数配置区分大小写.格式为: //项目配置文件r ...
- CentOS_7.2安装MySQL_5.7
一.安装依赖包和开发工具: yum install vim vim-enhanced wget zip unzip telnet ntsysv compat* apr* nasm* gcc gcc* ...
- chattr和lsattr
这两个命令是和权限有关 1.chattr +i carlton.txt 对carlton.txt文件进行锁定,谁也不能进行任何修改,取消的话可以chattr -i carlton.txt 就可以 2. ...
- Ext4 ComboBox组件使用
先来看例子: Ext.define('schoolModel', { extend: 'Ext.data.Model', fields: [{ name: 'id', type: 'string' ...
- python 邮件
1:文件形式的邮件 01.#!/usr/bin/env python3 02.#coding: utf-8 03.import smtplib 04.from email.mime.text impo ...