Guest User

Untitled

a guest
Jul 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. # add your ssh_key to remote
  2. cat ~/.ssh/id_rsa.pub | ssh user@host 'cat >> .ssh/authorized_keys'
  3.  
  4. # run commands automatically after doing ssh login
  5. ssh user@host -t "cd /data/var/www/stage/; bash --login"
  6.  
  7. # create an alias for some command. Add this to your ~/.bash_profile
  8. alias ssh_stage='ssh -i ~/path/to/key.pem user@host -t "cd /data/var/www/stage/; bash --login"'
Add Comment
Please, Sign In to add comment