[1] The ssh package for vscode is great
https://code.visualstudio.com/docs/remote/ssh
[2] Also check out rsub which allows you to open a file in your terminal locally
151–160 of 230 posts
[1] The ssh package for vscode is great
https://code.visualstudio.com/docs/remote/ssh
[2] Also check out rsub which allows you to open a file in your terminal locally
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.
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
That's likely to be a firing offence, no? If I were running things I wouldn't want employees deliberately subverting my network's security measures in the name of their own convenience. If you have to spend time wrestling the VPN while you're on the clock, that's their own time being wasted.
- mirror: to attach to server in read-only mode.
- pair: attach to server in pair mode, allowing the client to control the terminal as well.
- rogue: attach to server in rogue mode, which allows both editing with the host and switching to windows independently from the host.
I personally use rogue to share tmux sessions between my own devices without affecting whatever I'm doing on the other devices.
while true ; do
# TODO: make this do desktop notifications instead of osd_cat
echo "TUNNEL CONNECTING" | osd_cat --pos=middle --align=center --lines=1 \
--font="-unregistered-latin modern sans-bold-r-*-*-140-*-*-*-*-*-*-*" \
--color=green1 --outline=2 --outlinecolour=white --delay=1
ssh -2 -4 -a -k -n -x -y -N -T -D 127.0.0.1:1234 user@example.com
sleep 3
done
Separate from these little personal tunnels, there's some additional SSH timeout options (sorry I don't have handy at the moment) that I've found frequently helpful in my uses of SSH at work, plus an external timeout wrapper that can kill the ssh process, for long-running scripts dealing with a non-OpenSSH server, but they've almost never been necessary in practice for these personal tunnels.Earlier quoted context omitted.
Of course if the multiplex stalls or goes down so do all of the connections you have running through it. It's like screwing up Gnome Terminal or similar that uses a main server and multiple clients. Screw one pooch and you're whole session of things is similarly screwed.
True, but I never see SSH go down, unless there's a network issue, in which case I lose all my connections anyway.
edit: a typo
Earlier quoted context omitted.
I use a config file for all my regular SSH connections as well. But I stopped using more than one key when I could not think of a threat model that it addressed. If the bad guys get a copy of my public key off one remote server, they can't use it to access any other remote server. They would need the private key, which is on my laptop. And if the bad guys get my laptop, then they get all my keys; having separate priv…
If a bad guy gets root on one server you're currently connected via ssh with, and forwarding said key via, they can also access (unless otherwise firewalled) all systems that ssh key grants them access to. See also: https://github.com/FiloSottile/whoami.filippo.io Using a private key per system or set of systems means that such an attacker would only gain access to what that key grants them access to. My "github" key…
I have, since 2010, practiced "jumps" only - that is, if I need to connect to a non-routeable host through a routeable one ("bastion host" or "jump host"), then the intermediate host is only used as a transport, by way of -L/-R forwarding of the final destination's ssh port, or by netcat, or (since a couple of years ago) SSH's internal ProxyJump or ProxyCommand; compared to agent forwarding, this is less efficient CPU-wise and traffic-wise, but not by much; and it is as safe as connecting to the final destination directly, unlike agent forwarding.
ssh not having support for --password argument is a big drawback. Usually requires to use some weird workarounds, especially when copying ssh keys to the machine are not an option.
Earlier quoted context omitted.
Word of warning: using jump hosts shift your mindset towards building an internal network with lax security, the crunchy outside/soft tasty inside security antipattern. (Yes you don't intend it at the start, but the realities of your later evaluations of where to invest effort security-wise will leave the internal network to rot since you won't think of the scenarios of how it would be compromised)
Isn't that typically already the mindset, since most people set up networks with non-routable (10, 192.168 etc) IP addresses?