Skip to content

Instantly share code, notes, and snippets.

@sickerin
sickerin / ssh
Last active August 17, 2023 08:08 — forked from danydev/ssh
Iterm2: Show both IP_ADDRESS and HOSTNAME as a badge.
#!/bin/bash
# Script that updates the iTerm Badge with the hostname of the server that you are
# connecting to with ssh.
#
# Instructions:
# - Put this script in ~/bin/ssh (this will override the default ssh binary)
# - Run 'chmod +x ~/bin/ssh' to give execution permission to the script
# - Open iTerm\Preferences\Profiles, select your profile and put '\(user.current_ssh_host)' in the Badge text box
# - Enjoy!