Live data from Hacker News

SSH hacks – a little sanity for remote workers

smallstep.com

21–30 of 230 posts

Re: SSH hacks – a little sanity for remote workers

#21
post #13
post #10

Earlier quoted context omitted.

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).

That `tmux` bit is clever. Wonder if you could do that in a `ForceCommand` or something like that so you don’t need to type that part either?

(Not OP) I personally don't type my advanced commands, I alias them. So I would use "ssh-target" as my alias there.

Re: SSH hacks – a little sanity for remote workers

#23
post #7

Earlier quoted context omitted.

Yup. I have no idea why they call it an escape character . It's an escape sequence , always of length two.

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

#25
My favorite SSH trick is to have a machine at work SSH back to my home domain, and provide a tunnel back for Remote Desktop or what have you.

Wee, no VPN to deal with. No lack of a VPN for remote access to deal with.

https://cygwin.com/pipermail/cygwin/2020-April/244384.html

Re: SSH hacks – a little sanity for remote workers

#27

My favorite SSH trick is to have a machine at work SSH back to my home domain, and provide a tunnel back for Remote Desktop or what have you. Wee, no VPN to deal with. No lack of a VPN for remote access to deal with. https://cygwin.com/pipermail/cygwin/2020-April/244384.html

Do be careful doing this, if your company cares, a competent network admin can tell what's going on.

Re: SSH hacks – a little sanity for remote workers

#28
post #27

My favorite SSH trick is to have a machine at work SSH back to my home domain, and provide a tunnel back for Remote Desktop or what have you. Wee, no VPN to deal with. No lack of a VPN for remote access to deal with. https://cygwin.com/pipermail/cygwin/2020-April/244384.html

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

#29

My favorite SSH trick is to have a machine at work SSH back to my home domain, and provide a tunnel back for Remote Desktop or what have you. Wee, no VPN to deal with. No lack of a VPN for remote access to deal with. https://cygwin.com/pipermail/cygwin/2020-April/244384.html

At a large company, I imagine IT would be concerned about this setup. Though it’s on them to make the proper VPN solution more usable.

Hacking your home domain would give someone a powerful jumping off point for hacking other things on your corporate network.

Re: SSH hacks – a little sanity for remote workers

#30
post #9

Earlier quoted context omitted.

This is a good one. I've used this in the past in order to get onto IPv6-only networks as well. In my case I don't have IPv6 enabled on my home internet (thanks Verizon!) and I had a tiny virtual machine with Vultr, which at their lowest price point aren't offering IPv4 address space any more. Using a jump through another machine with both 4 and 6 address space saved me from having to cough up more money solely for a…

Use teredo at home. apt install miredo (on most debian based systems) https://en.wikipedia.org/wiki/Teredo_tunneling

You can also use Tor as IPv6 proxy in a pure IPv4 network (or as IPv4 proxy in a pure IPv6 network), recent versions of Tor can work under pure IPv6, gaining privacy and connectivity simultaneously. The speed is not actually too bad for web browsing, although not ideal for SSH. But still comes handy sometimes, I'm used it before to clone packages from GitHub on IPv6-only servers.
Post reply on HN