Created
January 23, 2013 08:43
-
-
Save zoras/4603223 to your computer and use it in GitHub Desktop.
ssh snipets
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
deploy@li166-177:~$cd ~/.ssh/ | |
deploy@li166-177:~/.ssh$ls -lh | |
deploy@li166-177:~/.ssh$ grep authorized_key /etc/ssh/sshd_config | |
#AuthorizedKeysFile %h/.ssh/authorized_keys | |
deploy@li166-177:~/.ssh$ vi authorized_keys | |
deploy@li166-177:~/.ssh$ ls -lh | |
deploy@li166-177:~/.ssh$ chmod 600 authorized_keys | |
deploy@li166-177:~/.ssh$ chmod 600 authorized_keys* | |
# ssh setup | |
cat ~/.ssh/id_rsa.pub | ssh deployer@someapp.com 'cat >> ~/.ssh/authorized_keys' | |
ssh-add # -K on Mac OS X | |
#count no of files | |
find . -type f | wc -l | |
#find text in file | |
find ./ -name '*' | xargs grep -ni 'text to find' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment