ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known
Recently I came across the same issue. I was able to ssh to my pi on my network, but not from outside my home network.
I had already:
- installed and tested ssh on my home network.
- Set a static IP for my pi.
- Set up a Dynamic DNS service and installed the software on my pi.
I referenced these instructions for setting up the static ip, and there are many more instructional resources out there.
Also, I set up port forward on my router for hosting a web site and I had even port forward port 22 to my pi's static IP for ssh, but I left the field blank where you specify the application you are performing the port forwarding for on the router. Anyway, I added 'ssh' into this field and, VOILA! A working ssh connection from anywhere to my pi.
I'll write out my router's port forwarding settings.
(ApplicationTextField)_ssh (external port)_22 (Internal Port)_22 (Protocal)_Both (To IP Address)_192.168.1.### (Enabled)_checkBox
Port forwarding settings can be different for different routers though, so look up directions for your router.
Now, when I am outside of my home network I connect to my pi by typing:
Then I am able to input my password and connect.
Git push error: ssh: Could not resolve hostname domain.com[:7555]: nodename nor servname provided, or not known
Try removing the square brackets in the URL.
ssh: Could not resolve hostname git: Name or service not known fatal: Could not read from remote repository
I was getting the same error.
url value in
Ubuntu ssh: Could not resolve hostname myserver: Name or service not known
The problem is, that your local computer do not know myserver.
So you have several option:
1.) You can edit your local /etc/hosts
and set there the public IP to myserver, but than you need to do it on all computer which should access myserver
2.) If you are own a domain, you can set the public IP of your server to myserver.mydomain.com in your DNS configuration.
3.) You can also set myserver in .ssh/config
Bash Script Read All the Files in Directory
Android Studio 2.3 Using Emulator from Console, "/Dev/Kvm Device: Permission Denied" for Root User
Code Snippet Managers for Linux Desktops
Tcp_Tw_Reuse VS Tcp_Tw_Recycle:Which to Use (Or Both)
How to Tell Whether I'm in a Screen
Location of .Bashrc for "Bash on Ubuntu on Windows" in Windows 10
Docker-Compose Up Leads to "Client and Server Don't Have Same Version (Client:1.14, Server: 1.12)" Error But Client and Server Have the Same Version
How to Add Timestamp While Redirecting Stdout to File in Bash
Munmap() Failure with Enomem with Private Anonymous Mapping
Embedding an Icon in a Linux Executable
Using Sed to Remove a Block of Text
How to Find Binary Files in a Directory
How Secure Is Storing Password with Git
Command Not Found via Ssh with Single Command, Found After Connecting to Terminal
Difference Between Linux Loadable and Built-In Modules
Sort Across Multiple Files in Linux