rm -rf /var/ftp/pub
mount /dev/cdrom /var/ftp
yum install -y lftp
cd /etc/yum.repos.d/
rm -rf ./*
cat > /etc/yum.repos.d/ftp.repo<<EOF
[ftp]
name=ftpbase
baseurl=ftp://172.17.0.1/pub
enabled=1
gpgcheck=0
EOF
cd
yum install -y vim net-tools openssh-server*
mkdir /var/run/ssh
sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config
sed -i "s/#UseDNS.*/UseDNS no/g" /etc/ssh/sshd_config
sed -i "s/GSSAPIAuthentication.*/GSSAPIAuthentication no/g" /etc/ssh/sshd_config
ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N ''
ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key -N ''
passwd 输入密码
vim /sshd.sh
#!/bin/bash
/usr/sbin/sshd -D
chmod +x /sshd.sh
rm -rf ~/.ssh/known_hosts (登录过需要删除key)
ssh ip
pkill docker
iptables -t nat -F
ifconfig docker0 down
iptables -t nat -F
ifconfig docker0 down