Question

Is it possible to connect to an SSH server through a Telnet connection?

I am trying to connect to an SSH server from Flash, but there is no OpenSSH implementation available in ActionScript. I can successfully connect to a Telnet server and execute commands.

I am not able to make any changes on the machine with the SSH server. The machine I am connecting with is running Windows XP SP3. I am willing to get whatever software for the Windows machine that is necessary.

Was it helpful?

Solution

I suppose there is http server on machine with ssh server. You can use php script to execute commands (use ssl to secure connection)

if you have control over client machine you can write (for example in C) ssh proxy to telnet proxy. I think that will be much easier then writing ssh client in actionscript

OTHER TIPS

To connect a SSH server you need a SSH client. Just like connecting to Telnet server a Telnet client is needed.

Maybe you could set up a SSH tunnel between you machine and machine with SSH server, and make the ActionScript to use the remote machine via the SSH tunnel?

In practical terms, no. Possible alternative:

You could telnet to a proxy server that you operate and that then establishes SSH connections to where you want. But that would of course be defeating the security purpose of using SSH in the first place.

I guess it would be possible theoretically. But you'd have to do the SSL handshake and of course de- and encryption "manually" in actionscript. Prepare for a long development roadmap.

You can setup Putty or Tunnelier for the SSH connection and use a local port for you flash socket. See http://www.bitvise.com/port-forwarding

I think you are getting mixed up, and the question itself is misleading as telnet and ssh are two very different things from the tcp/ip viewpoint - SSH uses the defined internet standard port no of 22 (depending on the installation, this may be bumped up to another port by configuration to prevent hackers getting in, generally 2222 is used but it varies!) Telnet on the other hand uses port 23. See here for the clarification of the ports used... In short I am not 100% sure if you can do this but it's worth a shot as I have not tried it...Look here for more details on how to tunnel the POP3 protocol across ssh.

When you connect to port 9999 on the localhost, i.e. 127.0.0.1, you are thereby tunnelling the pop3 server across ssh. As in the example on the securityfocus site, can you forward the telnet port port over to some other port as an example, in your case I think:

ssh -L 9999:telnet:23 somehost

so when you telnet to 9999 you are effectively tunnelled through the SSH.

As a matter of interest what system is running the SSH service? Is it Linux/Unix? The parameter switches to use is -L for local forwarding, likewise for remote forwarding it is -R, the rest of the command parameters remains the same. The essential keyword here is port forwarding.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top