Created
June 22, 2013 15:31
-
-
Save luxixing/5841286 to your computer and use it in GitHub Desktop.
一些常用sh命令收集
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#将本地生成的公匙写入到远端服务器的验证文件中,实现无密码登录 | |
cat ~/.ssh/id_rsa.pub | ssh user@host "cat - >> ~/.ssh/authorized_keys" | |
#生成ssh密匙命令在当前用户家目录 | |
ssh-keygen | |
#显示系统有多少用户 | |
cat /etc/passwd | cut -d: -f1 | |
#ssh登陆之后执行一个命令 | |
ssh -t [email protected] "cd /data ; bash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment