インターネット経由でSSH経由で自分のデバイスにアクセスできません。

インターネット経由でSSH経由で自分のデバイスにアクセスできません。

私のAndroidデバイスのポート22でsshdroidサーバーを実行しており、マイコンピュータを使用してssh(LAN)を介して接続すると、次の結果が表示されます。

root@kali:~# ssh -l root 100.107.219.116
The authenticity of host '100.107.219.116 (100.107.219.116)' can't be established. 
RSA key fingerprint is xxxxxxxxxxxxxxxxxxxx­xxxxxxxxxxxxxxxxxx
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '100.107.219.116' (RSA) to the list of known hosts.
SSHDroid
Use 'root' as username
Default password is 'admin'
[email protected]­'s password: 
root@android:/data/­data/­berserker.android.app­s.sshdroid/home #

SSH(インターネット)経由でアクセスしようとすると

root@kali:~# ssh -l root x.xx.xx.xxx
ssh: connect to host x.xx.xx.xxx port 22: No route to host 
root@kali:~#

そのため、nmapを介して外部ポートをスキャンして出力として取得しました。

root@kali:~# nmap x.xx.xx.xxx
Starting Nmap 6.47 (http://nmap.org/) at 2015-09-29 16:30 IST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn 
Nmap done: 1 IP address (0 hosts up) scanned in 3.13 seconds 
root@kali:~# nmap -Pn x.xx.xx.xxx

Starting Nmap 6.47 (http://nmap.org/) at 2015-09-29 16:30 IST

Nmap scan report for x.xx.xx.xxx
Host is up (0.11s latency).
All 1000 scanned ports on 1-39-60-154.live.vod­afone.in (x.xx.xx.xxx) are filtered
Nmap done: 1 IP address (1 host up) scanned in 5.77 seconds 

root@kali:~#

DIR-600Mルーターを使用しています。インターネット経由で自分のデバイスにSSHでどのように接続しますか?

ベストアンサー1

ルーターの背後には複数のホスト(Androidなど)があります。

ルータは、着信SSHパケット(*)をどこに送信するのか、それを受け入れるのかを知りません。

受け入れた着信パケットをどのように処理するか(どのIPに送信するか)、ルーターに通知する必要があります。

これはしばしば呼び出されます。フォワードポートルーター設定Webページから。

例えば

ssh (port 22) -> 192.168.1.22
web (port 80&443) -> 192.168.1.80
Foo (port 12345, 666, 1756) -> 192.168.1.100
etc

(*)一般的な反対意見は次のとおりです。

しかし、私のルータはローカルIPで開いているポート22を取得し、ポート転送を更新できませんか?

いいえ上記のように、ルータはユーザーが着信接続を受け入れるかどうかを推測する方法はありません(開いているポートを検索するのにかかる時間だけが考慮されます)。

おすすめ記事