简体   繁体   English

SSH通过Telnet连接

[英]SSH Through Telnet Connection

Is it possible to connect to an SSH server through a Telnet connection? 是否可以通过Telnet连接到SSH服务器?

I am trying to connect to an SSH server from Flash, but there is no OpenSSH implementation available in ActionScript. 我正在尝试从Flash连接到SSH服务器,但是ActionScript中没有可用的OpenSSH实现。 I can successfully connect to a Telnet server and execute commands. 我可以成功连接到Telnet服务器并执行命令。

I am not able to make any changes on the machine with the SSH server. 我无法使用SSH服务器在计算机上进行任何更改。 The machine I am connecting with is running Windows XP SP3. 我连接的计算机正在运行Windows XP SP3。 I am willing to get whatever software for the Windows machine that is necessary. 我愿意为Windows计算机获取所需的任何软件。

To connect a SSH server you need a SSH client. 要连接SSH服务器,您需要SSH客户端。 Just like connecting to Telnet server a Telnet client is needed. 就像连接到Telnet服务器一样,需要Telnet客户端。

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? 也许您可以在计算机与装有SSH服务器的计算机之间建立SSH隧道,并使ActionScript通过SSH隧道使用远程计算机?

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. 您可以通过telnet到您要操作的代理服务器,然后建立到所需位置的SSH连接。 But that would of course be defeating the security purpose of using SSH in the first place. 但这当然会打败使用SSH的安全性目的。

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. 但是您必须进行SSL握手,当然还要在动作脚本中“手动”进行解密和加密。 Prepare for a long development roadmap. 长远的发展路线做准备。

I suppose there is http server on machine with ssh server. 我想在带有ssh服务器的机器上有http服务器。 You can use php script to execute commands (use ssl to secure connection) 您可以使用php脚本执行命令(使用ssl来保护连接)

if you have control over client machine you can write (for example in C) ssh proxy to telnet proxy. 如果您可以控制客户端计算机,则可以将ssh代理(例如在C语言中)写入telnet代理。 I think that will be much easier then writing ssh client in actionscript 我认为这比在ActionScript中编写SSH客户端要容易得多

You can setup Putty or Tunnelier for the SSH connection and use a local port for you flash socket. 您可以为SSH连接设置Putty或Tunnelier,并为Flash套接字使用本地端口。 See http://www.bitvise.com/port-forwarding 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. 我认为您感到困惑,问题本身是令人误解的,因为telnet和ssh从tcp / ip角度来看是两个截然不同的事物-SSH使用定义的22号互联网标准端口(取决于安装,可能会被颠簸通过配置将其设置为另一个端口以防止黑客入侵,通常使用2222,但它会有所不同!)另一方面,Telnet使用端口23。请参见此处以了解所使用的端口...总之,我不确定100%确定如果您可以做到这一点,但是值得一试,因为我还没有尝试过...查看此处 ,了解有关如何跨ssh隧道POP3协议的更多详细信息。

When you connect to port 9999 on the localhost, ie 127.0.0.1, you are thereby tunnelling the pop3 server across ssh. 当您连接到本地主机上的端口9999(即127.0.0.1)时,您将通过SSH在pop3服务器上建立隧道。 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: 就像在securityfocus网站上的示例中一样,您是否可以将telnet端口转发给其他端口作为示例,在您的情况下,我认为:

ssh -L 9999:telnet:23 somehost

so when you telnet to 9999 you are effectively tunnelled through the SSH. 因此,当您远程登录到9999时,就可以有效地通过SSH建立隧道。

As a matter of interest what system is running the SSH service? 出于兴趣,哪个系统正在运行SSH服务? Is it Linux/Unix? 是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. 切换为使用-L进行本地转发的参数,同样地对于远程转发使用-R,其余命令参数保持不变。 The essential keyword here is port forwarding. 这里的基本关键字是端口转发。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM