If you want, it is very easy to do view-only tmux sessions with no third-party tools required. That is, you start your tmux specifying a socket (tmux -S ...), and then have a dedicated ssh user which references it (tmux -S ... attach -r, where -r is for read-only) as sshd's ForceCommand (a 10-liner https://gist.github.com/madars/e6b957ea508be1dcd9044fd2c7096...)
SSH hacks – a little sanity for remote workers
31–40 of 230 posts
Re: SSH hacks – a little sanity for remote workers
#32> What are your favorite SSH tips & tricks? $ ssh -J user1@host1 user_final@host_final or $ ssh -J user1@host1,user2@host2 user_final@host_final Not many people know it, you don't need to launch a SSH within a SSH session - SSH has built-in support of using one SSH server as a proxy to another SSH server. Useful for hacking servers accessing servers behind a firewall, or using your own server as a proxy to bypass a b…
And in your ~/.ssh/config that's the ProxyJump directive. Adding a proper configuration for the bastion/jump host and for the target host means you can just to "ssh target". In my case, I usually do "ssh target -t tmux -2 att" to attach to my tmux session, then when I detach it will close the SSH connection (and all of my tunnels).
Re: SSH hacks – a little sanity for remote workers
#33Earlier quoted context omitted.
Do be careful doing this, if your company cares, a competent network admin can tell what's going on.
You can defeat deep packet inspection by tunneling it over an HTTPS proxy, using the SSH ProxyCommand option and the proxytunnel utility
Re: SSH hacks – a little sanity for remote workers
#341. Install iTerm.
2. ssh -t remote.workstation 'tmux -CC new-session -A -D -s main'
Re: SSH hacks – a little sanity for remote workers
#35I was tired enough of losing connections to work systems I was working on when network topology changes, or my laptop was moved, or it went to sleep, or I moved to a new computer (e.g. I'm at home) that I wrote a simple script to jump all my ssh connections through a VM at work, but with the extra step that the connection from the jump VM happens in a tmux that's named based on the desired host, and with options to r…
Re: SSH hacks – a little sanity for remote workers
#36Earlier quoted context omitted.
And on an international keyboard it’s ~~, because ~ defaults to being a character modifier. If you nest SSH sessions, then you add more ~s. So in your fifth nested SSH session on an international keyboard the escape sequence would be \n~~~~~~~~~~.
Does anyone know of a modification that will e.g. dump hostname on a ~? -- so many times I'm in a few layers deep and likely to miscount.
Re: SSH hacks – a little sanity for remote workers
#37Re: SSH hacks – a little sanity for remote workers
#38Earlier quoted context omitted.
Do be careful doing this, if your company cares, a competent network admin can tell what's going on.
You can defeat deep packet inspection by tunneling it over an HTTPS proxy, using the SSH ProxyCommand option and the proxytunnel utility
Re: SSH hacks – a little sanity for remote workers
#39Earlier quoted context omitted.
You can defeat deep packet inspection by tunneling it over an HTTPS proxy, using the SSH ProxyCommand option and the proxytunnel utility
or just sshuttle
Re: SSH hacks – a little sanity for remote workers
#40Earlier quoted context omitted.
Do be careful doing this, if your company cares, a competent network admin can tell what's going on.
You can defeat deep packet inspection by tunneling it over an HTTPS proxy, using the SSH ProxyCommand option and the proxytunnel utility
He still works there in a Government Agency riddled with staff who are perfectly adapt at doing enough to stay hired and doing little enough to describe their job as a paid hobby.