tinyssh icon indicating copy to clipboard operation
tinyssh copied to clipboard

Option to enable unrestricted access and to spawn a custom process instead of shell

Open 1Hyena opened this issue 7 years ago • 2 comments

In the spirit of websockify and tcpserver, I have added functionality to tinysshd that allows secure connections to a public TCP server (a MUD, for example). If the public server does not implement its own application layer security and only has support for the telnet protocol then providing that much needed security would be really simple thanks to tinysshd.

A couple of new command line parameters were added to tinysshd. They are also documented in the manual:

 -e command
        execute the given command instead of spawning the shell (disables exec channel requests)

 -g username
        enable unrestricted guest access as the specified user in the host system

The most expected use case for this added functionality could be illustrated with the below example: tcpserver -HRDl0 0.0.0.0 4022 ./tinysshd -g guest -e 'nc localhost 4000' ./tinyssh-keys

MUDs still use the completely insecure telnet protocol (execute telnet stonia.ttu.ee 4000, for example). You will see that it asks sensitive information such as the password to be sent over a plaintext channel. With the help of the proposed features a lot of MUDs could be made more secure without having to change a single line in their codebase. Thanks to the fact that tinyssh is so light weight the integration would go real smoothly just like adding websocket support to a plaintext server with the help of websockify.

This enhancement to tinyssh was mainly inspired by this article.

You can see this in action by running ssh mud.sndd.io.

1Hyena avatar Oct 27 '17 15:10 1Hyena

@janmojzis Hi! Please review. Thanks.

1Hyena avatar Mar 01 '18 10:03 1Hyena

@janmojzis I've noticed you've pushed some changes that have caused conflicts between my pull request. Do you want me to update the PR accordingly?

1Hyena avatar Feb 04 '19 19:02 1Hyena