19 ms·
Tinyssh
- jmuguy 5y agosimple configuration - TinySSH can’t be misconfigured Seems like a challenge to me!
- SudoSH 5y agoSounds like challange accepted by a few of us.
- haunter 5y ago>no copyright restrictions - TinySSH is in the public domain Are there any jurisdictions which doesn't recognize public domains?
- throw0101a 5y ago* https://opensource.stackexchange.com/questions/9871/why-is-there-no-public-domain-licensing-in-europe https://opensource.stackexchange.com/questions/9871/why-is-t...
- terinjokes 5y agoFortunately, the actual license on the project is CC0-1.0 to attempt to handle those jurisdictions.
- snvzz 5y agoIt manages to be longer and more complicated than MIT. I wish it was dual-licensed as MIT.
- tbrock 5y agoWow, no dynamic memory allocation stood out to me in the description. Pretty interesting! This being auditable and significantly decreasing the attack vector surface area for ssh seems promising.
- onlydnaq 5y agoWithout having looked into it too deeply I feel that they are somewhat “cheating” by using a superserver to launch a new process for each connection, thus letting the OS handle the dynamic allocation needed for each connection. Still pretty impressive project. Would be fun to take a deeper look at it at some point.
- hkt 5y agoIt makes sense though - no memory management simplifies the codebase. Letting the host deal with it instead means you get the niceties of process level isolation and less complexity. More eyes are on the OS level code than would be on this project. It seems very clever to me.
- zamadatix 5y agoThe OS is already handling dynamic memory allocation on each connection. This provides a nice split where you don't need to do it in 2 places.
- throw0101a 5y ago> […] thus letting the OS handle the dynamic allocation needed for each connection. This is what PHK did when designing Varnish (IIRC): instead of dealing with lots of files on its own (like Squid), just create some files and do a malloc() on them and let the OS do the work: * https://varnish-cache.org/docs/trunk/phk/notes.html https://varnish-cache.org/docs/trunk/phk/notes.html One discussion (many others): * https://news.ycombinator.com/item?id=4874304 https://news.ycombinator.com/item?id=4874304
- mrich 5y agoIt's not malloc() but mmap() if I understand correctly. It's a beautifully powerful function :) https://man7.org/linux/man-pages/man2/mmap.2.html https://man7.org/linux/man-pages/man2/mmap.2.html
- richardwhiuk 5y ago
- deleted 5y ago[deleted]
- asveikau 5y agoNo RSA support really stands out. No doubt many reading this have RSA identity keys on disk right now in ~/.ssh. It's been the default for so long.
- turminal 5y agoBeing tiny always means giving up some features. Supporting RSA really doesn't go along well with being tiny & straightforward.
- rectang 5y agoIf you're like me and have just been using RSA because of inertia, here's a discussion of why you might switch to ed25519 as an alternative: https://www.reddit.com/r/sysadmin/comments/4gktbr/ssh_ed25519_keys_vs_rsa_benefits_and_drawbacks/ https://www.reddit.com/r/sysadmin/comments/4gktbr/ssh_ed2551... I particularly enjoyed this answer: > ed25519 is more secure in practice. One of the biggest reasons to go with ed25519 is that it's immune to a lot of common side channels. While ed25519 is slightly less complex to crack in theory, in practice both of them are long enough that you're never going to be able to crack it, you need a flaw to exploit in the implementation or a substantial leap forward in cryptanalysis. ed25519 is more secure in practice because most instances of a break in any modern cryptosystem is a flaw in the implementation, ed25519 lowers the attack surface here.
- thomasahle 5y ago
- hestefisk 5y agoVery timely with an alternative. There’s a huge monoculture risk with everyone using OpenSSH (although I love it).
- chasil 5y agoHowever, it does require an sftp and scp binary from OpenSSH, if these features are to be used. The latest scp clients use the sftp server, but older implementations will need both to be accessible.
- formerly_proven 5y agoFor a secure/minimal set I'd just avoid sftp and it's client-commanded resource management. Just use plain scp, the protocol is very simple.
- kevin_nisbet 5y agoI believe there are several implementations built off the golang implementation (https://pkg.go.dev/golang.org/x/crypto/ssh https://pkg.go.dev/golang.org/x/crypto/ssh) of SSH protocol such as Teleport (https://github.com/gravitational/teleport/ https://github.com/gravitational/teleport/) I'm not familiar with additional approaches, and Teleport is a very different approach than tinyssh, focused on more features and controls than regular SSH. I imagine there are several other good options using the golang libs, or in theory someone could build their own limited implementation as an alternative. And full disclosure, I work for Teleport, but my comments are my own.
- vollmond 5y agoI haven't seen the "words of code" metric before, and some cursory web searching doesn't reveal much. Is there a standard? Just split on the given language's punctuation/delimiters?
- caiusdurling 5y agoI wondered that too, then figured you'd want to exclude non /[a-z0-9]/I characters. They answer what it means and provide the command used to figure it out in the first FAQ: https://tinyssh.org/faq.html https://tinyssh.org/faq.html
- turminal 5y agoI remember first seeing it somewhere on cr.yp.to, where it was counted with some regex that did something like splitting it on some delimiter-like characters.
- kilroy123 5y agoIt's also interesting to see 'Postquantum crypto'.
- formerly_proven 5y agoJust use wc, it's close enough. $ wc void main(int argc, char **argv) { printf("Hi, I'm %s\n", argv[0]); } 1 11 70 lines words chars $ tr '()[]{}*+.>,";'"'"- ' ' | wc void main(int argc, char **argv) { printf("Hi, I'm %s\n", argv[0]); } 1 13 70
- daneel_w 5y agoHow does it compare to Dropbear?
- chasil 5y agoNo CVEs, much smaller cipher set, password authentication is not allowed, only ed25519 user authentication is supported.
- voakbasda 5y agoNo CVEs yet. It would be truly exceptional should that record withstand widespread adoption.
- chasil 5y agoForegoing dynamic memory allocation, removing all non-DJB ciphers, and supporting only inetd drastically reduces the attack surface, so there is some hope that no CVEs will ever be found.
- voakbasda 5y agoThere may be some hope, but I would not bet on it. Indeed, I can imagine this very thread resulting in a miffed security researcher uttering "challenge accepted" and finding a way to break it. Again, that is not something I would bet against, given enough time and eyeballs. That said, I greatly appreciate this kind of effort, and I will probably even look into using it for small embedded projects in the future. My pessimism about security track records does not block out my optimism that we can and should do better, and this sounds much better than some other alternatives.
- chasil 5y agoIt is also quite useful for older systems where the native SSH doesn't support newer features. I have to support an Oracle 10g database on this platform, and I run tinyssh on port 26: $ ssh -p 26 myserver.com $ cat /etc/redhat-release /etc/oracle-release Red Hat Enterprise Linux Server release 5.11 (Tikanga) Oracle Linux Server release 5.11 $ ps -e -o user,pid:5,args | grep tinyssh root 14147 tinysshd -lpsv -x sftp=/usr/libexec/openssh/sftp-server /etc/tinyssh/sshkeydir $ size /usr/sbin/tinysshd text data bss dec hex filename 122828 1428 680156 804412 c463c /usr/sbin/tinysshd Unfortunately, I can't get it running on HP-UX 10.20, but I only have one of those left.
- ape4 5y agoIts a server so I would have called it tinysshd or something
- exikyut 5y agoAnd admittedly it would have qualified "this is only a server and doesn't come with a client" too. Ah well.
- fmajid 5y agoExcept it's not actually a daemon, it runs as a child server process of inetd, tcpserver or (blech) systemd.
- cogburnd02 5y agoI'm looking for some kind of tiny ssh client I can squeeze into an Apple II. I'm pretty sure even dropbear is too big (I haven't actually tried yet, though so YMMV.) Are there any other smaller SSH clients out there?
- formerly_proven 5y agoTake libssh and start swinging an axe?
- ape4 5y agoWow an Apple ][ What OS / program environment do you have?
- cogburnd02 5y agoI've got both DOS 3.3 and ProDOS on 5 1/4 floppy. I can use ADTPro and I recently got (but haven't yet installed) an Uthernet ethernet card.
- greggyb 5y agoLike the OpenSSHd project?[0] [0]: https://www.openssh.com/ https://www.openssh.com/
- tfigment 5y agoCould not see if it supported SSH Certificates but see no references to them. I'm using those to make it easier to avoid authorized_keys file updates but seems like its not popular.
- CameronNemo 5y agoCisco and Juniper don't support them either (at least last I checked), even though I am pretty sure they ship openssh.
- AceJohnny2 5y agoI too wish it had SSH certificates. We use Dropbear on some embedded targets (Linux on FPGA), and the support for only keys, and difficulty of updating the target, means all our devs share one SSH key to access the target. It's not great.
- lazide 5y agoFYI - ansible has some built ins that let you manage keys pretty easily. Making sure a machine has the right key set only takes a few seconds and can happen entirely over ssh.
- dang 5y agoOne past thread: TinySSH is a small SSH server using NaCl, TweetNaCl - https://news.ycombinator.com/item?id=7727738 https://news.ycombinator.com/item?id=7727738 - May 2014 (61 comments)
- elromulous 5y agoI love the concept, specifically launching new servers to avoid dynamic allocation. However: > no dependency on OpenSSL - TinySSH has its own crypto library compatible with NaCl, Libsodium Apologies in advance for being a security curmudgeon, but I'll eat my hat if their homegrown crypto library doesn't have vulnerabilities. Crypto is hard, even for the best experts. The only way to get this right is with code that's had many eyes on it and has been battle tested.
- AceJohnny2 5y agoNaCl/libsodium is a modern implementation by crypto experts. It's as far cry from "homegrown" as you can get. Arguably, it's better designed than OpenSSL, having been started by crypto experts in response to Heartbleed and the concern for the code quality and legacy code in OpenSSL. Edit: my bad, TinySSH is using its home-grown version of NaCl, so parent's comment applies.
- tylersmith 5y agoThey're not using NaCl, they're using a custom code implementation of the relevant NaCl interfaces.
- kemayo 5y agoYeah, but it's not using NaCl or libsodium. It just says it's "compatible with" them.
- AdriaanvRossum 5y ago> speed - TinySSH can be also compiled using high-speed NaCl library instead of internal. Sounds like you can use NaCI directly.
- AceJohnny2 5y agoI wonder what is the advantage of one over the other? The faq doesn't say.
- nemoniac 5y agoThey mention some ssh features that tinyssh does not have but it would be helpful to have a complete list. What I really would like to know is whether you can just drop it into an environment that uses a modern ssh configuration without the need for legacy versions.
- xchip 5y agoAwesome project!
- deleted 5y ago[deleted]
- denton-scratch 5y agoSo does this depend on systemd? [Edit] I got downvoted, for some reason. It's a simple question - the article says it uses certain systemd components. I'm just asking if it can be used without systemd.
- CptanPanic 5y agoIs there an official docker image anywhere?