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