LoginSignup
8
5

More than 5 years have passed since last update.

VirtualBoxにSSH接続しようとしてConnection refused。

Posted at

概要

久しぶりにVM作ってSSH接続しようとしたら、
ssh: connect to host ???.???.???.??? port 22: Connection refused
でコケてしまった件について綴ります。

凡ミスだし、同じような記事も5万件ぐらいあるかも知れないですが、自分用に…。

解決策

たぶん、VirtualBox側でポートフォワーディングの設定をしてあげれば解決するよ!

ss_123.png

SSHはデフォルトでは22番ポートを使うので、SSH側の設定を特に変更していない場合は、
VirtualBoxのポートフォワーディングルールでホストとゲストのポートを両方とも22に設定してあげればOK!

とっても簡単ね!

関連

その他SSHのトラブルは↓もオススメ!

8
5
0

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
8
5