Live data from Hacker News

SSH has become our universal (Unix) external access protocol

utcc.utoronto.ca

11–20 of 99 posts

Re: SSH has become our universal (Unix) external access protocol

#11
post #2

SSH port forwarding is one amazing aspect of this software. For one example, you can develop on a remote system by forwarding your local port 3000 to the remote 3000, using something like `ssh -nFL 3000:localhost:3000 user@remote`, all while going through SSH! It's an indispensable tool for modern development.

Ahh, good times. SSH tunnels and FoxyProxy to run X11 applications on remote servers.

Re: SSH has become our universal (Unix) external access protocol

#13

An alternative I am seeing mentioned with some frequency is Tailscale, which doesn't need port 22 open to the internet, since it's using its own network's connectivity to facilitate your "tailscale SSH" connectivity. From what I read it's very similar to Amazon's SSM Agent. The usefulness here is that you're closing off ports and reducing your exposure, the downside is that you need proprietary agents installed on th…

It's a proprietary network but not proprietary agents (except the bits specific to proprietary platforms).

One handy feature this enabled is that you can include their open source go library in your program and avoid needing to install anything besides your own binary.

Re: SSH has become our universal (Unix) external access protocol

#14

Need to get a file from one box to another? Have SSH? `scp` is your friend: https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol scp remote.host:path.txt local scp local remote.host:path Need a fast proxy to browse the internet securely and bypass restrictions without a VPN? SSH SOCKS proxy! Supported by most operating systems, but I tend to use it directly via Firefox so that it is isolated to one browser. This…

If you use container tabs in Firefox, you can also configure proxies on a per-container basis! In case that’s useful to other people besides me.

In case anyone besides me had never heard of this feature:

https://support.mozilla.org/en-US/kb/how-use-firefox-contain...

Re: SSH has become our universal (Unix) external access protocol

#15
That's nice and all, but as TFA already mentions, ssh has a large attack surface. The most critical one though is that you usually grant people access to a shell, so if an account gets breached, you need to worry about local root exploits, which are actually pretty common.

Also, believe it or not, setting up key-based authentication is quite the challenge for a lot of people, especially if you demand encryption of the private key and setting up an agent. However, you cannot enforce private key encryption server-side, so you can't even guarantee some kind of 2FA is in place. Yes, ssh does nowadays support FIDO, but that's even more complicated for users...

Re: SSH has become our universal (Unix) external access protocol

#16

You can do all sorts of things with SSH. My favorite is SSHFS, which is couplings for SFTP that treat it like a proper filesystem, and it works on everything that uses SSH. Quicker to setup than a VPN and SMB, and about as secure (you could also theoretically use PAM to authenticate with LDAP or newer MFA protocols)

qemu lets you boot VMs over ssh:

  $ qemu-kvm -hda ssh://example.com/var/tmp/fedora-39.img -m 2048
The magic here is done by https://www.libssh.org// which we also use in https://libguestfs.org/nbdkit-ssh-plugin.1.html

Re: SSH has become our universal (Unix) external access protocol

#17
post #6

What about an IP whitelist managed on some other website (say in AWS). If you need remote access while you are travelling, you login to that website, which will add your current IP to the whitelist. The server refreshes its firewall with the new whitelist every 5 minutes. So within 5 minutes you get access. That creates another layer of protection (authentication to the website). I would assume a linux firewall is ve…

Apart from the complexities added by having to build this in the first place, this works, but requires a desktop environment, which is not true of ssh.

You could make the argument that this could be an off-the-shelf product you simply install, but then the default port for it because as big of a target as port 22 as soon as it becomes commonplace enough, except you don't have 20+ years of open-source security research in it, and now you're relying on AWS not being now in your region to connect to your servers.

Re: SSH has become our universal (Unix) external access protocol

#18
Drives me nuts that somewhere along the devops journey people decided that SSHing into a private server used for internal tools is an antiquated and outrageous thing to expect. People for some reason are actually excited about the prospect -- "we're gonna make it so you never have to SSH!". Little do they know that I like SSH. A lot more than I like clicking on the AWS console. And then somehow we're expected to debug the bastard using logz.io or similar -- unconscionable to me but maybe I'm old

Re: SSH has become our universal (Unix) external access protocol

#19

Need to get a file from one box to another? Have SSH? `scp` is your friend: https://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol scp remote.host:path.txt local scp local remote.host:path Need a fast proxy to browse the internet securely and bypass restrictions without a VPN? SSH SOCKS proxy! Supported by most operating systems, but I tend to use it directly via Firefox so that it is isolated to one browser. This…

sshuttle[0] is a great tool that turns a regular SSH connection into something that behaves more like a traditional VPN.

e.g. I can run "sshuttle -r myserver example.com", and when I next load example.com in my web browser (without any special configuration) it'll be routed via `myserver`.

[0] https://github.com/sshuttle/sshuttle

Re: SSH has become our universal (Unix) external access protocol

#20

An alternative I am seeing mentioned with some frequency is Tailscale, which doesn't need port 22 open to the internet, since it's using its own network's connectivity to facilitate your "tailscale SSH" connectivity. From what I read it's very similar to Amazon's SSM Agent. The usefulness here is that you're closing off ports and reducing your exposure, the downside is that you need proprietary agents installed on th…

One of the major issues was that a VPN client requires additional configuration and software. Connectivity is the least of the problems they are trying to solve.
Post reply on HN