SSH has become our universal (Unix) external access protocol
SSH is widely used at a university for remote access. Organizations prefer a single VPN for security in low external access environments. WireGuard is suggested for personal use due to its security advantages over SSH.
Read original articleSSH has become a universal external access protocol at a university due to the need for remote access by individuals traveling widely. While VPNs and other options exist, SSH's widespread compatibility and simplicity make it a preferred choice. In environments with less external access, organizations can centralize on a single VPN for security. For personal use, WireGuard is recommended due to its lower attack surface compared to SSH. The article emphasizes the importance of securing external access protocols and highlights the flexibility and ubiquity of SSH in facilitating remote connections.
Related
SSH as a Sudo Replacement
Using SSH instead of sudo, the article addresses limitations of setuid binaries for privilege escalation. It details configuring s6-sudod to allow authorized users root access securely, emphasizing OpenSSH's security features.
Remote shell to a Raspberry Pi at 39,000 ft
The author shares their positive experience beta testing remote shell on Raspberry Pi Connect during a flight, praising its stability and efficiency for text commands. They highlight its advantages over VNC in low-bandwidth situations.
OpenSSH Race condition resulting in potential remote code execution
OpenSSH 9.8, released on July 1, 2024, addresses critical security issues like ObscureKeystrokeTiming vulnerabilities in sshd(8) and ssh(1), plans to deprecate DSA support, and introduces penalties for failed authentications. Various improvements included.
Protecting sshd using spiped (2012)
The article highlights spiped as a secure pipe daemon to protect sshd, offering a simpler alternative to 'ssh -L' by establishing a pre-shared secret key between hosts. Spiped enhances server security efficiently.
Remote Unauthenticated Code Execution in OpenSSH Server
Qualys found regreSSHion, a critical RCE flaw in OpenSSH on glibc-based Linux systems. Over 14 million servers are at risk, with potential root access. Qualys created an exploit but delays release for patching.
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 starts a socks proxy on the desired port: ssh -D $port $host
Firefox has network settings, simply choose SOCKS, 127.0.0.1 as the IP and the specified port as the port. Then you're off to the races.Until we had proper VPN infrastructure to enter our VPC at AWS I would utilize this to view private vpc-only RMQ dashboards.
Love SSH!
The usefulness here is that you're closing off ports and reducing your exposure, the downside is that you need proprietary agents installed on the remote devices, and clients (tailscale itself or the SSM extension to AWS CLI) on proprietary networks doing the routing for you. Which might be perfectly fine for your use cases.
I've done even less reading but is Cloudflare's WARP client the same thing for their own network?
SFTP is a great example of a protocol which has a discrete server (look! There's sftp-server on your computer. Nothing prevents it from running over TLS, or a web socket). I wish that this was the way the entire suite worked. I wish the multiplexing, and underlying shell implementation was transport agnostic (perhaps relying on SOCK_STREAM, or SOCK_SEQPACKET semantics), and the authentication, encryption, etc was its own thing.
In the remote machine, you only need to create a bare repository:
git init --bare
And in your "client" machines you use it like any other remotes:
git remote add my_remote my_user@my_host:path_to_repo
It can be useful if for some reason you don't want to use GitHub/GitLab/Bitbucket/etc or as a glorified scp
If you really want to have something that gives you access to remote resources in any network the only solution is to use a VPN over TLS on the port 443, to make it impossible to distinguish it from any other normal HTTPS traffic. This is the reason why I run an OpenVPN server at my company, where normally I use Wireguard that is more performant (but it's blocked in a lot of networks).
At the end of the day port 443 with TLS traffic on it is the only thing that is guaranteed to not have been blocked (on port 80, 25, etc firewalls may check that you are effectively transferring HTTP traffic, they could not on 443 since the traffic is encrypted, tough a smart firewall can assume from traffic patterns that the connection is unlikely HTTPS, to this day I've jet to se a firewall this smart).
Default SSH is with certificates, passwords not used. I like that. Hard to brute force a certificates.
In the old flat 10.X.X.X network amazon days - your new hosts were absolutely hammered when being brought up. There must have been folks on the amazon network itself just portscanning like crazy.
That creates another layer of protection (authentication to the website). I would assume a linux firewall is very hard to bypass so almost as good as not exposing the server to the WAN. And doesn't have all the problems and complexity associated with VPNs, works on any device from anywhere.
With this you can easily set up a centralized SSH keys system without the pitfalls of decentralized systems or running a CA. Have the user register their public key on your website in the typical fashion, and then write a simple secure endpoint and use AuthorizedKeysCommand to instantly integrate all your OpenSSH servers.
It also lets you implement more exotic authorization schemes with the full capabilities of your internal backend, which is often a million times more enjoyable than fighting through Linux PAM.
If you use SSSD and LDAP and don't like the idea of relying on a curl every login, you can also centrally-manage the keys in LDAP for a similar effects.
but yes this is why its so important for OpenSSL client and server sides to be as bulletproof as they can. its a giant worldwide SPOF and therefore a drool-inducing pinata for hackers.
For eg.
Cyberark
Checkpoint harmony
Teleport [https://goteleport.com]
Strongdm [https://www.strongdm.com/]
Adaptive [https://adaptive.dev/]
and there are many other tools like these.
It seems like there should be a better solution - something like port-knocking but done properly.
Hence why I rather like it. github uses ssh keys - surely developers can learn to set those up?
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...
The "SSH has a wide attack surface as seen by RCE ..." is a bit dishonest IMO. How s any VPN more secure?
If you want configure SSH to be pubkey only and hand over Yubikey to your users.
I wonder: in all the recent data leaks leaking billions of users data where attackers were inside company's networks (and not just on online facing servers), was it through SSH holes that these attack too place? Or are we talking about a corporate culture of Windows+VPN?
Related
SSH as a Sudo Replacement
Using SSH instead of sudo, the article addresses limitations of setuid binaries for privilege escalation. It details configuring s6-sudod to allow authorized users root access securely, emphasizing OpenSSH's security features.
Remote shell to a Raspberry Pi at 39,000 ft
The author shares their positive experience beta testing remote shell on Raspberry Pi Connect during a flight, praising its stability and efficiency for text commands. They highlight its advantages over VNC in low-bandwidth situations.
OpenSSH Race condition resulting in potential remote code execution
OpenSSH 9.8, released on July 1, 2024, addresses critical security issues like ObscureKeystrokeTiming vulnerabilities in sshd(8) and ssh(1), plans to deprecate DSA support, and introduces penalties for failed authentications. Various improvements included.
Protecting sshd using spiped (2012)
The article highlights spiped as a secure pipe daemon to protect sshd, offering a simpler alternative to 'ssh -L' by establishing a pre-shared secret key between hosts. Spiped enhances server security efficiently.
Remote Unauthenticated Code Execution in OpenSSH Server
Qualys found regreSSHion, a critical RCE flaw in OpenSSH on glibc-based Linux systems. Over 14 million servers are at risk, with potential root access. Qualys created an exploit but delays release for patching.