激情久久久_欧美视频区_成人av免费_不卡视频一二三区_欧美精品在欧美一区二区少妇_欧美一区二区三区的

服務器之家:專注于服務器技術及軟件下載分享
分類導航

Linux|Centos|Ubuntu|系統進程|Fedora|注冊表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服務器之家 - 服務器系統 - Ubuntu - Ubuntu下安裝rsh實現無密碼訪問詳解

Ubuntu下安裝rsh實現無密碼訪問詳解

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

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

一、環境

1.三臺服務器ubuntu14.04, 主機名分別為compute,block1和blcok2

2.兩臺主機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(三臺主機都安裝),并設置啟動rsh和rlogin服務

1 安裝

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

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

?
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 重啟動

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

三、建立信任文件,實現無密碼訪問配置

1.在root主目錄下建立.rhosts文件,并在此文件內寫入這兩臺主機的主機名

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

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

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

?
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

四、配置完畢,驗證配置

1.在compute服務器上直接輸入rsh block1 date就可以在block1上無密碼執行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命令可以遠程復制文件
至此rsh無密碼訪問配置完畢。

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持服務器之家。

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 日韩精品二区 | 免费看成年人网站 | 九九精品视频免费 | 免费亚洲视频在线观看 | 国产精品久久久久无码av | 国产亚洲精品久久777777 | 亚洲第一黄色网 | 91精品国产92久久久久 | 欧产日产国产精品v | 精品国产一区二 | 欧美成人午夜一区二区三区 | av在线免费观看中文字幕 | 中文字幕专区高清在线观看 | 欧美人人干 | xxx18hd18hd日本 | 成人午夜精品久久久久久久3d | 日韩精品中文字幕一区二区三区 | 毛片区 | 国产视频在线免费观看 | 91网址在线播放 | 99久久精品免费看国产小宝寻花 | 久久久一区二区三区四区 | 一级免费视频 | 亚洲成人精品一区二区 | 亚州成人在线观看 | 羞羞的视频在线 | 午夜视频在线观看免费视频 | 色99久久 | 久久综合综合久久 | 欧美福利视频一区二区三区 | 国产精品久久久在线观看 | 久久久三级免费电影 | 久久婷婷一区二区三区 | 美国av免费看| 人人做人人看 | 日本欧美国产 | 日韩精品中文字幕一区二区 | 精品一区二区三区免费爱 | 精品国产91久久久久久浪潮蜜月 | 日本视频网| 久久99精品国产99久久6男男 |