SSH ポートを 22 から 6433 に更新しましたが、今は自分のコンピュータで SSH を使用できなくなりました。この行を更新しました/etc/ssh/sshd_config
。
# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 22
到着
# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
Port 6433
次のコマンドを使用してSSHサービスを再起動しました。
$ service sshd restart
エラーは返されません。新しい端末タブを開き、次を実行します。
$ ssh [email protected] -p6433
返品:
ssh: ホストへの接続 ip.address ポート 6433: ホストへのパスなし
問題を解決する方法がわかりませんか?
更新 -
SELinuxがアクティブではありません。
ベストアンサー1
@Vinodのおかげで、私は次のことをやって正しい道を行っていました。
$ firewall-cmd --zone=permanent --add-port=6433/tcp
$ firewall-cmd --reload
これで、SSH経由で私のサーバーに接続できます。