ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known

前端 未结 15 2311
忘掉有多难
忘掉有多难 2020-12-12 09:34

I am trying to set up a VPN with a Raspberry Pi, and the first step is gaining the ability to ssh into the device from outside my local network. For whatever re

15条回答
  •  执笔经年
    2020-12-12 10:20

    If your command is:

    $ ssh -p 1122  path/to/pemfile user@[hostip/hostname]
    

    You will also face the same error

    ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known
    

    when you miss the option -i /path/to/pemfile of ssh

    So Command should be:

    $ ssh -p 1122 -i path/to/pemfile user@[hostip/hostname]
    

提交回复
热议问题