5344
5432
1万
管理员
本站资源如失效,请点击反馈!
ssh [email protected]
passwd
addgroup admin
useradd -d /home/bill -s /bin/bash -m bill
passwd bill
usermod -a -G admin bill
visudo
apt-get update && apt-get upgrade apt-get install sudo
root ALL=(ALL:ALL) ALL
root ALL=(ALL:ALL) ALLbill ALL=(ALL) NOPASSWD: ALL
root ALL=(ALL:ALL) ALLbill ALL=(ALL:ALL) ALL
exitssh [email protected]
cat ~/.ssh/id_rsa.pub | ssh [email protected] 'mkdir -p .ssh && cat - >> ~/.ssh/authorized_keys'# 或者在服务器端,运行下面命令echo "ssh-rsa [your public key]" > ~/.ssh/authorized_keys
sudo cp /etc/ssh/sshd_config ~sudo nano /etc/ssh/sshd_config
Port 25000
Protocol 2PermitRootLogin noPermitEmptyPasswords noPasswordAuthentication noRSAAuthentication yesPubkeyAuthentication yesAuthorizedKeysFile .ssh/authorized_keysUseDNS no
AllowUsers bill
sudo chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh/
sudo service ssh restart# 或者sudo /etc/init.d/ssh restart
Host s1HostName 128.199.209.242User billPort 25000
ssh s1
locale
sudo locale-gen en_US en_US.UTF-8 en_CA.UTF-8sudo dpkg-reconfigure locales
sudo apt-get updatesudo apt-get upgrade
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
手机版|飞雪团队
GMT+8, 2024-11-24 04:02 , Processed in 0.067197 second(s), 21 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.