Shortcuts to servers

Posted on by Kim

vi ~/.ssh/config

Host jenkins
    Hostname 198.234.12.434
    User geaddev

Host test
    Hostname v-x-e-4ewf.edfer.facb
    User geaddev

vi ~/.bash_aliases
alias jenkins='ssh jenkins'
alias tst='ssh test'
alias sta='ssh staging'

Add key to server
ssh-copy-id -i ~/.ssh/id_rsa.pub tst
Change color
alias sta="printf %b '\e]11;#FDA50F\a' && ssh staging"
alias prod="printf %b '\e]11;#770000\a' && ssh prod"

0 Responses to "Shortcuts to servers":