Created
January 25, 2013 15:06
-
-
Save quentindecock/4635082 to your computer and use it in GitHub Desktop.
pairme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "REMEMBER: tmux -2 -S /tmp/tmux -attach; chmod aog+rwx /tmp/tmux" | |
ssh ci 'awk !/:1026/ ~/.ssh/known_hosts > ~/.ssh/known_hosts.new' | |
ssh ci 'mv ~/.ssh/known_hosts ~/.ssh/known_hosts.bak' | |
ssh ci 'mv ~/.ssh/known_hosts.new ~/.ssh/known_hosts' | |
ssh -v -N -R 1026:localhost:22 [email protected] >> /tmp/ssh_tunnel.out & | |
/usr/local/bin/tmux -2 -S /tmp/tmux |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think we can replace lines 4-6 with:
ssh ci "sed '/:1026/d' filename.txt"
and make a backup beforehand