一区二区三区在线-一区二区三区亚洲视频-一区二区三区亚洲-一区二区三区午夜-一区二区三区四区在线视频-一区二区三区四区在线免费观看

服務(wù)器之家:專注于服務(wù)器技術(shù)及軟件下載分享
分類導(dǎo)航

Linux|Centos|Ubuntu|系統(tǒng)進(jìn)程|Fedora|注冊表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服務(wù)器之家 - 服務(wù)器系統(tǒng) - Ubuntu - Ubuntu下安裝rsh實(shí)現(xiàn)無密碼訪問詳解

Ubuntu下安裝rsh實(shí)現(xiàn)無密碼訪問詳解

2022-01-06 15:42翟海飛 Ubuntu

這篇文章主要為大家詳細(xì)介紹了Ubuntu下安裝rsh實(shí)現(xiàn)無密碼訪問的相關(guān)資料,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

一、環(huán)境

1.三臺服務(wù)器ubuntu14.04, 主機(jī)名分別為compute,block1和blcok2

2.兩臺主機(jī)hosts文件都為:
root@compute:~# cat /etc/hosts
127.0.0.1 localhost
192.168.4.132 compute
192.168.4.133 block1
192.168.4.134 block2

二、安裝rsh和rsh-server(三臺主機(jī)都安裝),并設(shè)置啟動(dòng)rsh和rlogin服務(wù)

1 安裝

?
1
apt-get install rsh-client rsh-server xinetd

2 ubuntu下原來沒有/etc/xinetd.d/rsh文件,新建并添加內(nèi)容

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# default: on
# descrīption: The rshd server is the server for the rcmd(3) routine and, \
#    consequently, for the rsh(1) program. The server provides \
#    remote execution facilities with authentication based on \
#    privileged port numbers from trusted hosts.
service shell
{
    disable = no
    socket_type       = stream
    wait          = no
    user          = root
    log_on_success     += USERID
    log_on_failure     += USERID
    server         = /usr/sbin/in.rshd
}
 
/etc/xinetd.d/rlogin
 
# default: on
# descrīption: rlogind is the server for the rlogin(1) program. The server \
#    provides a remote login facility with authentication based on \
#    privileged port numbers from trusted hosts.
service login
{
    disable = no
    socket_type       = stream
    wait          = no
    user          = root
    log_on_success     += USERID
    log_on_failure     += USERID
    server         = /usr/sbin/in.rlogind
}
 
/etc/xinetd.d/rexec
 
# default: off
# descrīption: Rexecd is the server for the rexec(3) routine. The server \
#    provides remote execution facilities with authentication based \
#    on user names and passwords.
service exec
{
    disable = no
    socket_type       = stream
    wait          = no
    user          = root
    log_on_success     += USERID
    log_on_failure     += USERID
    server         = /usr/sbin/in.rexecd
}

3 重啟動(dòng)

?
1
2
3
root@block2:~# /etc/init.d/xinetd restart
xinetd stop/waiting
xinetd start/running, process 26181

三、建立信任文件,實(shí)現(xiàn)無密碼訪問配置

1.在root主目錄下建立.rhosts文件,并在此文件內(nèi)寫入這兩臺主機(jī)的主機(jī)名

?
1
2
3
4
root@block1:~# cat .rhosts 
compute root
block1 root
block2 root

注:root 驗(yàn)證需要/root/.rhosts文件,普通用戶需要/etc/hosts.equiv文件

2.在/etc目錄下建立hosts.equiv文件,并在此文件內(nèi)寫入作為客戶端主機(jī)的主機(jī)名

?
1
2
3
4
root@block1:~# cat /etc/hosts.equiv 
# /etc/hosts.equiv: list of hosts and users that are granted "trusted" r
#      command access to your system .
compute

3 在文件/etc/securetty中

加入rsh rlogin rexec

四、配置完畢,驗(yàn)證配置

1.在compute服務(wù)器上直接輸入rsh block1 date就可以在block1上無密碼執(zhí)行date命令

?
1
2
root@compute:~# rsh block2 date
Thu Mar 30 16:38:42 CST 2017

2.在compute上直接輸入rsh block1就可以無密碼登錄block1
3.普通用戶操作同root用戶
4.還有rcp命令可以遠(yuǎn)程復(fù)制文件
至此rsh無密碼訪問配置完畢。

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持服務(wù)器之家。

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 国产成人精品曰本亚洲77美色 | 97热在线 | 婷婷综合七月激情啪啪 | 日韩欧美不卡视频 | 亚洲成人影院在线观看 | 青青久久久国产线免观 | 97影音| 亚洲人成综合在线播放 | 欧美综合影院 | 韩国久播影院理论片不卡影院 | 亚洲天堂激情 | 日本在线观看免费高清 | 国产精品视频在这里有精品 | 22sihu国产精品视频影视资讯 | 香蕉久久一区二区三区啪啪 | 国产日产韩产麻豆1区 | 欧美精品一国产成人性影视 | 99久久久久久久 | 久久草福利自拍视频在线观看 | 男人使劲躁女人视频免费 | 国产麻豆成91 | 调教扩张宫颈女人惨叫 | 日本一区二区视频免费播放 | 国产精品合集一区二区 | 美女厕所尿尿擦逼 | 日本免费三区 | 男同志gays | 国产成人综合一区人人 | jizz漫画| 精品女同一区二区三区免费站 | 扒开老师挠尿口到崩溃刑罚 | 思敏1一5集国语版免费观看 | 茄子视频懂你更多apl | 欧美成人另类人妖 | 亚洲国产区男人本色在线观看欧美 | 啊好大好粗| 乳女教师欲乱动漫无修版动画3d | 欧美日韩国产一区二区三区欧 | 精品国产91久久久久久久 | 亚洲国产自| 鄂州一家三口完整版免费 |