0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

termuxで立ち上げたsshdに繋がらない時の対処法

Posted at

状態

F-Droid経由からインストールしたTermux環境にsshdを入れて起動しても別クライアントから繋がらない(Connection refusedと言われる)。

原因

sshdのバインド先が不適切だった。
sshd -dして状態を見ると

debug1: Bind to port 8022 on 0.0.0.0
Server listening on 0.0.0.0 port 8022

ipアドレスが虚無っています。

対処

sshdの設定ファイルがあるところまで移動して(筆者の環境の場合、/data/data/com.termux/files/usr/etc/ssh)
sshd_configに以下を追記

ListenAddress [ネットワークアダプタのIP(ip -4 aで確認可能)]

これで別端末からssh -p 8022 [termuxユーザ名]@[hostのip]で繋がるはずです。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?