Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # add your ssh_key to remote
- cat ~/.ssh/id_rsa.pub | ssh user@host 'cat >> .ssh/authorized_keys'
- # run commands automatically after doing ssh login
- ssh user@host -t "cd /data/var/www/stage/; bash --login"
- # create an alias for some command. Add this to your ~/.bash_profile
- 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