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

前端 未结 15 2304
忘掉有多难
忘掉有多难 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:35

    If you're on Mac, restarting the DNS responder fixed the issue for me.

    sudo killall -HUP mDNSResponder
    
    0 讨论(0)
  • 2020-12-12 10:35

    In my case I was trying ssh like this

    ssh pedro@192.168.2.179:22 
    

    when the correct format is:

    ssh pedro@192.168.2.179 -p 22 
    
    0 讨论(0)
  • 2020-12-12 10:36

    Try this, considering your allowed ports. Store your .pem file in your Documents folder for instance.

    To gain access to it now all you have to do is cd [directory], which moves you to the directory of the allotted file. You can first type ls, to list the directory contents you are currently in:

    ls
    cd /Documents
    chmod 400 mycertificate.pem
    ssh -i "mycertificate.pem" ec2-user@ec2-1-2-3-4.us-compass-0.compute.amazonaws.com -p 80
    
    0 讨论(0)
提交回复
热议问题