您的位置:首页 > 运维架构 > Linux

CentOS7修改主机名+免密码

2015-03-03 00:09 302 查看
1.修改主机名
1.1
vim /etc/sysconfig/network
# Created by anaconda
NETWORKING=yes
HOSTNAME=lee151
NTPSERVERARGS=iburst



1.2
vim /etc/hosts
127.0.0.1 localhost lee151
::1 localhost lee151
192.168.0.152 lee152
192.168.0.153 lee153
192.168.0.154 lee154



1.3
vim /etc/hostname
lee151
1.4
可以reboot重启
hostnamectl status
可参考http://www.centoscn.com/CentOS/config/2014/1031/4039.html



2.免密码
2.1防火墙默认是关闭的
/sbin/service iptables stop;chkconfig --level 35 iptables off



2.2关闭selinux
vim /etc/selinux/config

SELINUX=disabled





2.3.去认证
vim /etc/ssh/sshd_config
找到下列行 去掉注释负号#
RSAAuthentication yes //字面意思..允许RSA认证
PubkeyAuthentication yes //允许公钥认证
AuthorizedKeysFile .ssh/authorized_keys //公钥存放在.ssh/au..文件中



ssh-keygen -t rsa
cd /home/lee/.ssh

针对piix4_smbus ****host smbus controller not enabled的解决方法
[root@Nagios ~]# lsmod | grep i2c_piix4
i2c_piix4 12574 0
i2c_core 31274 1 i2c_piix4
[root@Nagios ~]# vi /etc/modprobe.d/blacklist.conf
blacklist i2c_piix4
[root@Nagios ~]# reboot
重启后再无此提示
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: