2021-07-15
Posted HanZhen001
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了2021-07-15相关的知识,希望对你有一定的参考价值。
一、修改主机名
#修改主机名
vi /etc/hostname
229:
vi /etc/hostname
bigdata229
vi /etc/hosts
172.16.104.229 bigdata229
172.16.104.228 bigdata228
172.16.104.225 bigdata225
228:
vi /etc/hostname
bigdata228
vi /etc/hosts
172.16.104.229 bigdata229
172.16.104.228 bigdata228
172.16.104.225 bigdata225
225:
vi /etc/hostname
bigdata225
vi /etc/hosts
172.16.104.229 bigdata229
172.16.104.228 bigdata228
172.16.104.225 bigdata225
二、配置ssh免密登录
ssh-keygen -t rsa
ll ~/.ssh
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 755 ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
ssh -Version
ssh bigdata229
******************************************
229:
scp ~/.ssh/authorized_keys bigdata228:~/
228:
cat ~/authorized_keys >> ~/.ssh/authorized_keys
229:
scp ~/.ssh/authorized_keys bigdata225:~/
225:
cat ~/authorized_keys >> ~/.ssh/authorized_keys
以上是关于2021-07-15的主要内容,如果未能解决你的问题,请参考以下文章