通过 Telnet 连接的 SSH
是否可以通过 Telnet 连接到 SSH 服务器?
我正在尝试从 Flash 连接到 SSH 服务器,但 ActionScript 中没有可用的 OpenSSH 实现。我可以成功连接到 Telnet 服务器并执行命令。
我无法在使用 SSH 服务器的计算机上进行任何更改。我连接的机器运行的是 Windows XP SP3。我愿意为 Windows 机器获取所需的任何软件。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
要连接 SSH 服务器,您需要 SSH 客户端。就像连接到 Telnet 服务器一样,需要 Telnet 客户端。
也许你可以在你的机器和带有 SSH 服务器的机器之间建立一个 SSH 隧道,并让 ActionScript 通过 SSH 隧道使用远程机器?
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?
实际上,没有。可能的替代方案:
您可以远程登录到您操作的代理服务器,然后该服务器与您想要的位置建立 SSH 连接。但这当然会违背使用 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. But that would of course be defeating the security purpose of using SSH in the first place.
我想机器上有http服务器和ssh服务器。 可以使用 php 脚本执行命令(使用 ssl 来保护连接),
如果您可以控制客户端计算机,则 您可以编写(例如在 C 中)ssh 代理到 telnet 代理。我认为这比在actionscript中编写ssh客户端要容易得多
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
我想理论上是可能的。但是您必须在动作脚本中“手动”进行 SSL 握手,当然还有解密和加密。准备一个漫长的开发路线图。
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.
您可以为 SSH 连接设置 Putty 或 Tunnelier,并为闪存套接字使用本地端口。
请参阅http://www.bitvise.com/port-forwarding
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
我认为你混淆了,问题本身具有误导性,因为从 tcp/ip 的角度来看,telnet 和 ssh 是两个非常不同的东西 - SSH 使用定义的互联网标准端口号 22(根据安装情况,这可能会被碰撞)通过配置连接到另一个端口以防止黑客入侵,通常使用 2222,但情况有所不同!) Telnet 另一方面使用端口 23。请参阅 此处用于澄清所使用的端口...总之,我不是 100% 确定您是否可以做到这一点,但值得一试,因为我还没有尝试过...看看此处了解有关如何通过 ssh 建立 POP3 协议隧道的更多详细信息。
当您连接到本地主机上的端口 9999(即 127.0.0.1)时,您就可以通过 ssh 为 pop3 服务器建立隧道。正如 securityfocus 站点上的示例一样,您能否将 telnet 端口端口转发到其他端口作为示例,在您的情况下,我认为:
因此,当您 telnet 到 9999 时,您实际上是通过 SSH 建立隧道的。
感兴趣的问题是哪个系统正在运行 SSH 服务?是 Linux/Unix 吗?本地转发使用的参数开关是-L,远程转发使用的参数开关是-R,其余命令参数保持不变。这里的基本关键字是端口转发。
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:
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.