1.mkdir /ceshi
cd /ceshi/
cp /etc/passwd /etc/shadow /ceshi/user
ln /ceshi/user/passwd ` ./passwd.bak
ln -s /ceshi/user/shadow ./sh.link
2.cp /etc/ssh/sshd-config /ceshi/sshd
3.find -name passwd -exec cat {} >> /passwd.txt ;
4.mkdir /root/test
mv /ceshi/ssh /ceshi/user/passwd.bak /root/test
5.yum install lrzsz
cd /root/test
tar cvzf newfile.tar.gz /ceshi/user /root/test/sshd
sz /root/test/newfile.tar.gz
6.tar xvf newfile.tar.gz -C /home/redhat
grep 1 newfile.tar.gz | tee /home/redhat/file
ab ↩︎