How do I make the apple terminal window auto change colour scheme when I ssh to a specific server

前端 未结 10 1824
甜味超标
甜味超标 2020-12-12 12:58

When I ssh into a remote production server I would like the colour scheme of my terminal window to change to something brigh and scary, preferably red, to warn me that I am

10条回答
  •  被撕碎了的回忆
    2020-12-12 13:51

    Another solution is to set the colors strait in the ssh config file:

    inside ~/.ssh/config

    Host Server1
       HostName x.x.x.x
       User ubuntu
       IdentityFile ~/Desktop/keys/1.pem
       PermitLocalCommand yes
       LocalCommand osascript -e "tell application \"Terminal\" to set background color of window 1 to {27655, 0, 0, -16373}"
    
    Host Server2
       HostName x.x.x.x
       User ubuntu
       IdentityFile ~/Desktop/keys/2.pem
       PermitLocalCommand yes
       LocalCommand osascript -e "tell application \"Terminal\" to set background color of window 1 to {37655, 0, 0, -16373}"
    

提交回复
热议问题