4 ms·
Ask HN: Hosting a CLI Tool via SSH?
Hi HN! I recently built a cli tool that uses AI to find job matches for software engineers (https://github.com/nicobrenner/commandjobs)
Someone on HN suggested (https://news.ycombinator.com/user?id=azophy_2) I should host the application via SSH, so that anyone could just do: ssh commandjobs.com
I thought that was super cool, but after doing some googling, I can't find any good resources on how to host command line applications via ssh
Would really appreciate any links or information you could provide on how to do it
Thank you
- nico 3y agoIt's pretty straightforward to host an application for 1 user, the session is just forced to run only the application But then if you want to have multiple, anonymous, users accessing the application at the same time, without sharing data, it gets tricky
- throwitaway1123 3y agoIf you need an open source example to use as a template you might want to take a look at soft serve: https://github.com/charmbracelet/soft-serve https://github.com/charmbracelet/soft-serve
- msylvest 3y agoI have not tried this out but https://github.com/charmbracelet/wish https://github.com/charmbracelet/wish - a companion to soft-serve - could be helpful to you
- nico 3y agoThis looks super helpful, love the premise: > That's a perfectly valid and probably the most common use of SSH, but it can do so much more than that. Just like HTTP, SMTP, FTP and others, SSH is a protocol! Thank you
- nico 3y agoThis looks fantastic, will be studying this up Thank you!
- K0IN 3y agoI'm not sure how to do it "the right way" but you may have a look at Paramiko, it's a python library that helps you implement your own SSH server (easily). maybe you can build your own wrapper that calls a subprocess.
- nico 3y agoThank you, will look into it
- spacehomedesign 3y ago[dead]
- d416 3y agosshcommand is probably the simplest approach to launch your app anonymously [0] To get more fancy with registration and a community, setup a BBS [1]. Here is how one BBS does it [2]. use the ‘local doors’ function to bridge to your app. good luck [0] https://github.com/dokku/sshcommand https://github.com/dokku/sshcommand [1] https://www.telnetbbsguide.com/bbs/connection/ssh/list/detail/ https://www.telnetbbsguide.com/bbs/connection/ssh/list/detai... [2] https://nuskooler.github.io/enigma-bbs/servers/loginservers/ssh.html https://nuskooler.github.io/enigma-bbs/servers/loginservers/...
- nico 3y agoThese links are amazing!! Thank you for sharing, what a treasure trove! Will definitely be checking out the bbs’s