LoginSignup
12
7

More than 3 years have passed since last update.

【Linux】Could not resolve hostname hogehoge: nodename nor servname provided, or not knownって出てSSH接続出来ない

Last updated at Posted at 2019-10-28

Could not resolve hostname hogehoge: nodename nor servname provided, or not known

いつもの様に人のPCの設定をしていたらこんなメッセージ。

やろうとしていた事

ssh hogehoge

↑のコマンドで123.123.12.123(例です)というIPアドレスに接続する
ポートも指定する。
しかし設定を終えてコマンドを叩くと冒頭のメッセージ。

解決

hostsにIPアドレスを記述していなかったので、

vi /etc/hosts

で追記。
無事に接続できる様になりました。

補足

今回やりたかった事をするには

~/.ssh/config
/etc/hosts

それぞれに設定の記述が必要。

Could not resolve hostnameって出てるので、
エラーメッセージ通りの間違いでしたね。

12
7
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
12
7