SSHポート22を開く方法は? [閉鎖]

SSHポート22を開く方法は? [閉鎖]

組み込みシステムにSSHユーティリティをインストールしましたが、接続できません。デバイスからネットワーク上の他のコンピュータにSSH経由で接続できますが、その逆は不可能です。

デバイスで開いている唯一のポートはポート21です。

userk@dopamine:~$ nmap 160.80.97.X

Starting Nmap 6.40 ( http://nmap.org ) at 2015-02-09 20:49 CET
Nmap scan report for 160.80.97.X
Host is up (0.0092s latency).
Not shown: 999 closed ports
PORT   STATE SERVICE
21/tcp open  ftp

接続しようとすると、接続拒否エラーが発生します。別のポートを試しましたが、何も変わりませんでした。構成ファイル /etc/ssh/sshd_config は次のようになります。

#Port 22
Port 223
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# The default requires explicit activation of protocol 1
Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 1h
ServerKeyBits 1024

# Ciphers and keying
#RekeyLimit default none

# Logging
# obsoletes QuietMode and FascistLogging
SyslogFacility AUTH
LogLevel INFO

# Authentication:

LoginGraceTime 2m
PermitRootLogin yes
StrictModes yes
MaxAuthTries 6
#MaxSessions 10

RSAAuthentication yes
PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile  .ssh/authorized_keys

iptablesがないのでインストールできません。 SSHを使用してデバイスに接続する方法は?

解決策

生成されたキーに問題があります。 / tmpフォルダに移動します。

mv /etc/ssh/ssh_host_* /tmp

そしてキーを再生成する

/etc/init.d/S50sshd restart OR /etc/init.d/sshd restart

または

ssh-keygen -A

ご協力ありがとうございます Braatchley、Abrixas2、0xC0000022Lに行ったことがありますか?

ベストアンサー1

#Port 22
Port 223

これは22がコメントアウトされ、223がアクティブになるのではありませんか? 223を使ってみましたか?

おすすめ記事