Is there ssh for MSX?

By klimchuk

Supporter (13)

klimchuk's picture

05-11-2022, 02:04

Currently I'm using Sony MSX2 with GR8NET cartridge for retro gaming and recreational software development (BASIC and Fusion-C). With GL.iNet GL-SFT1200 Wi-Fi router I have access from MSX to all my network devices via Wi-Fi and planned to ssh to Raspberry Pi to perform routine management tasks in terminal. Imagine my surprise when Google search did not return any meaningful results for "ssh for msx2" search. So:
1) Should I try Lycos.com instead?
2) How hard would be implement simple ssh client for MSX using C?

Login or register to post comments

By SjaaQ

Champion (375)

SjaaQ's picture

05-11-2022, 09:25

I think SSH is very difficult because of the encryption. Maybe possible but incredibly slow probably. Maybe that is the reason only a telnet client is available. I tried to find a client as well, a few years ago.

I think UZIX did not even implement it.

By geijoenr

Champion (364)

geijoenr's picture

05-11-2022, 10:26

I believe Konamiman tried long time ago and realized is not possible without external hardware to handle the crypto.

By SjaaQ

Champion (375)

SjaaQ's picture

05-11-2022, 12:13

Maybe there is where the GR8NET may help. If Eugeny can create hardware acceleration in the GR8NET. Not sure if something like that could be implented in FPGA.

By ducasp

Paladin (680)

ducasp's picture

05-11-2022, 12:40

klimchuk wrote:

Currently I'm using Sony MSX2 with GR8NET cartridge for retro gaming and recreational software development (BASIC and Fusion-C). With GL.iNet GL-SFT1200 Wi-Fi router I have access from MSX to all my network devices via Wi-Fi and planned to ssh to Raspberry Pi to perform routine management tasks in terminal. Imagine my surprise when Google search did not return any meaningful results for "ssh for msx2" search. So:
1) Should I try Lycos.com instead?
2) How hard would be implement simple ssh client for MSX using C?

MSX itself, alone, can't handle TSL/SSL or SSH. Any connection would time out before MSX would even think of finishing the calculations...

Currently we have two UNAPI solutions that allows TLS/SSL, one is made by Konamiman / Nestor Soriano and requires you to use a Linux computer (or a Pi) connected to the MSX to tunnel TLS/SSL through it. The other is the Wi-Fi solution I've implemented for SM-X / SX2 and that KdL has designed and made available an adapter for OCM/Zemmix Neo and its CLONES like SX1.

There is currently no solution to use SSH in MSX, since it is a different protocol that doesn't use TLS/SSL. In the case of my solution, Victor Trucco chose an ESP-01 module that has only 1MB of flash memory, and the ESP8266 firmware for that solution is already occupying 95% of the free space and still allowing firmware updates (in fact I've designed a hack, I'm using 148% and still allow safe firmware update but 256KB devoted to SSL certificates needs to be resent whenever you update the firmware), so I had to choose between SSL/TLS or SSH and I've chosen SSL because UNAPI already specified it and I think it is more useful (https connections are almost mandatory nowadays, and can be used for other stuff like telnet or ftp over ssl, but a client for that still needs to be implemented).

But, there is an easy way to SSL, you can use my telnet client (available at msxhub) and it has almost full ansi 16 colors support (except for blink) and works really nice connecting to Linux machines, so you can telnet to a PI that has telnet restricted to your local network and then from the Pi ssh to anywhere in your network or in the internet safely.

There are no plans as far as I know, from anyone, to do an adapter and software that makes it possible to directly ssh from the msx, so that is the only way to get it for now and in the foreseeable future.

Hope that info helps you Wink

By Rataplan

Champion (338)

Rataplan's picture

05-11-2022, 12:58

As stated before, you can't do it directly. Even my A1200 can't properly handle SSH without it's 68030 board installed, and even then it's very slow.
What you can do (opposed to just enabling telnet on your Pi) is create some sort of reverse proxy. Ie. you telnet grom MSX to your proxy, which in terms has an ssh connection to which your input is proxied. I've had something like that for my Amiga, but for the love of god I can't remember how I did that. But that should be possible from MSX as wellof course.

By ro

Scribe (4963)

ro's picture

05-11-2022, 13:20

Functionality, what do you need?

By klimchuk

Supporter (13)

klimchuk's picture

05-11-2022, 16:18

Thank you all for thoughtful and informative answers!
Would be nice to see GR8NET doing heavy lifting with encryption and provide some kind of ssh API for BASIC/C.
However it might not be an easy feat.
For the time being I guess will stick with "unsecured" Telnet.

By karloch

Prophet (2159)

karloch's picture

05-11-2022, 17:06

I think I have nothing to add to what has been said, except for this picture of my MSX telneting into a Raspberry Pi. As it is already stated, do this only on a trusted, well-controlled network.

By ducasp

Paladin (680)

ducasp's picture

05-11-2022, 17:48

klimchuk wrote:

Thank you all for thoughtful and informative answers!
Would be nice to see GR8NET doing heavy lifting with encryption and provide some kind of ssh API for BASIC/C.
However it might not be an easy feat.
For the time being I guess will stick with "unsecured" Telnet.

Secure Telnet should be possible on SM-X / OCM WI-FI or on a solution using Konamiman tunnel (tls/ssl) but unfortunately I still did not found some time to get my telnet client supporting ssl/tls, it is in my plans though... Do not know of any other msx telnet client supporting it either... Not sure whether Eugeny is planning on supporting SSL/TLS/SSH directly on gr8net, since it has a modular approach, as long as fpga has access to enough ram it should work for quite a few connections, but it surely will take quite some effort to support it.

By Accumulator

Champion (333)

Accumulator's picture

05-11-2022, 18:53

What is the purpose of using SSH?
Accessing a server or your MSX can be accessible by SSH?
Are you thinking about some kind X implementation and accessing your MSX with graphical X/NX feature?

HispaBBS was reachable by Telnet and SSH. So, should be possible, I guess it was using Uzix as well