免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
ssh登陸不再自己輸密碼 CentOS to Redhat
讓centos45的root用戶ssh登入redhat9 時(shí)不需要手動(dòng)輸入密碼
在centos45下的設(shè)置:
[root@centos45 ~]# cd
[root@centos45 ~]# ssh-keygen -d                     運(yùn)行這個(gè)才會(huì)生成.ssh這個(gè)目錄
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Created directory ‘/root/.ssh‘.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
1f:24:66:48:d2:4b:3c:ee:02:a8:49:d3:d5:76:8f:e4root@centos45
[root@centos45 ~]# cd .ssh
[root@centos45 .ssh]# ls
id_dsa  id_dsa.pub [root@centos45 .ssh]# scp id_dsa.pub 10.10.7.247:/root/.ssh/centos45_authorized_keys2      其實(shí)應(yīng)該用主機(jī)名redhat9,但我沒在host中添加只好用IP代替
The authenticity of host ‘10.10.7.247 (10.10.7.247)‘ can‘t be established.
RSA key fingerprint is 20:10:bd:9a:5f:56:36:1c:25:6a:dc:c8:8b:33:15:9f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘10.10.7.247‘ (RSA) to the list of known hosts.
root@10.10.7.247‘s password:
Permission denied, please try again.
root@10.10.7.247‘s password:
id_dsa.pub                                                  100%  603     0.6KB/s   00:00
在redhat9下的設(shè)置:
[root@redhat9 root]# cd
[root@redhat9 root]# mkdir .ssh [root@redhat9 root]# chmod 700 .ssh
[root@redhat9 root]# ll -a
total 80
drwxr-x---    4 root     root         4096 Jul  6 09:03 .
drwxr-xr-x   20 root     root         4096 Jul  6 08:47 ..
-rw-r--r--    1 root     root         1126 Aug 24  1995 .Xresources
-rw-------    1 root     root         3505 Jun 21 10:41 .bash_history
-rw-r--r--    1 root     root           24 Jun 11  2000 .bash_logout
-rw-r--r--    1 root     root          234 Jul  6  2001 .bash_profile
-rw-r--r--    1 root     root          176 Aug 24  1995 .bashrc
-rw-r--r--    1 root     root          210 Jun 11  2000 .cshrc
drwx------    2 root     root         4096 Jun 16 23:18 .gconfd
drwx------    2 root     root         4096 Jul  6 09:03 .ssh
-rw-r--r--    1 root     root          196 Jul 11  2000 .tcshrc
-rw-------    1 root     root         4496 Jun 21 10:12 .viminfo
-rw-r--r--    1 root     root         1157 Jun 16 23:45 anaconda-ks.cfg
-rw-r--r--    1 root     root        14041 Jun 16 23:42 install.log
-rw-r--r--    1 root     root         3534 Jun 16 23:42 install.log.syslog
-rw-r--r--    1 root     root         1671 Jun 17 11:09 root.txt
[root@redhat9 root]# cd .ssh
[root@redhat9 .ssh]# ll
total 4
-rw-r--r--    1 root     root          603 Jul  6 09:14 centos45_authorized_keys         2
[root@redhat9 .ssh]# cat centos45_authorized_keys2 >> authorized_keys2
[root@redhat9 .ssh]# ll
total 8
-rw-r--r--    1 root     root          603 Jul  6 09:15 authorized_keys2
-rw-r--r--    1 root     root          603 Jul  6 09:14 centos45_authorized_keys2
測(cè)試結(jié)果:
[root@centos45 .ssh]# ssh 10.10.7.247
Last login: Fri Jul  6 08:50:59 2007 from 10.10.7.245
[root@redhat9 root]# ls
anaconda-ks.cfg  install.log  install.log.syslog  root.txt
[root@redhat9 root]# exit
logout
Connection to 10.10.7.247 closed.
參考資料:
http://www.ichiayi.com/wiki/tech/sshlogin
http://www.l-penguin.idv.tw/article/ssh-keygen.htm
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
docker學(xué)習(xí)4-docker安裝mysql環(huán)境
6.2.1 Linux文件屬性 - 51CTO.COM
CentOS 6.0 (Final) 安裝Oracle 11gR2
linux之通過grep使用or、and、not操作
linux運(yùn)維初級(jí)班課前綜合考試及參考答案20110529(判斷進(jìn)程是否存在的小案例)
如何通過 SSH 在遠(yuǎn)程 Linux 系統(tǒng)上運(yùn)行命令 | Linux 中國(guó)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服