Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like my Terminal windows in OS X to display the security settings of any ssh tabs I have open, i.e. RSA/DSA, etc.

share|improve this question
add comment

1 Answer

You can set the title of your terminal with the following command:

MYTITLE="Something Witty"
echo -n -e "\033]0;$MYTITLE\007"

Option 1

You could place that in the .bashrc file of the hosts you are connecting to, and it would set the title when you log in.

Determining the security settings might be a bit more difficult. You might determine if you connected with Kerberos by inspecting $KRB5CCNAME. You can determine some things about the security of your X forwarding with the xauth program.

Also, this has the caveat of requiring you to implement this on every server you connect to.

Option 2

You could wrap the ssh command on your computer with a script that sets the window title before connecting to the server. Pseudo-code would be:

  1. Inspect the command line parameters to determine what security-related arguments were given
  2. Set the title to something that describes the security mode
  3. Pass the arguments to the real ssh program
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.