useradd myusername
passwd myusername
userdel myusername
root ALL=(ALL) ALL
下面一行添 加myusername ALL=(ALL) ALL
,将用户添加进root用户 组 usermod -g root myusername
,这样就能够使用sudo -i
进入root权限yum -y install vim*
git
systemctl restart network
yum -y install net-tools
firewall-cmd --add-port=22/tcp --permanent
,从新加载防火 墙配置 firewall-cmd --reload
ssh-keygen -t rsa
scp id_rsa.pub xxxx@192.168.56.101:~
cat id_rsa.pub > .ssh/authorized_keys
chmod 700 .ssh
chmod 600 .ssh/authorized_keys
PubkeyAuthentication yes
systemctl restart sshd.service
PasswordAuthentication no
, 并重启ssh服务 打开git-bash.exe ssh xxx@192.168.56.101
无需输入密码,直接登陆成功yum -y install lrzsz
yum -y install wget