无法通过ngrok SSH到远程Linux [英] Unable to ssh into remote Linux by ngrok

查看:417
本文介绍了无法通过ngrok SSH到远程Linux的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

远程Linux计算机位于内部网络中,没有公共IP地址.所以我安装了ngrok.

The remote Linux computer is in an internal network and has no public IP address. So I installed ngrok.

ngrok tcp 22

ngrok by @inconshreveable(Ctrl + C退出) 在线隧道状态
版本2.0.19/2.0.17
Web界面 http://127.0.0.1:4040
转发tcp://0.tcp.ngrok.io:36428-> 本地主机:22
连接ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00

ngrok by @inconshreveable (Ctrl+C to quit) Tunnel Status online
Version 2.0.19/2.0.17
Web Interface http://127.0.0.1:4040
Forwarding tcp://0.tcp.ngrok.io:36428 -> localhost:22
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00

我检查了sshd是否正在运行.

I checked that sshd is running.

在本地PC上,我尝试过

At the local PC, I tried

ssh myuser@ngrok.com -p36428

这引起了

ssh:连接到主机ngrok.com端口36428:连接被拒绝

ssh: connect to host ngrok.com port 36428: Connection refused

推荐答案

您连接到错误的目标地址.该命令应该是

You are connecting to the wrong destination address. The command should be

ssh myuser@0.tcp.ngrok.io -p36428

请注意其他主机名(即0.tcp.ngrok.io而不是ngrok.com).

Notice the different hostname (ie 0.tcp.ngrok.io instead of ngrok.com).

通常,您通常希望将user@hostname放在所有选项(例如-p36428)之后,即使它通常不会引起任何问题.

And generally you would want to put the user@hostname after all the options (eg -p36428), even though it doesn't generally cause any issues.

这篇关于无法通过ngrok SSH到远程Linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆