[solved] ssh: Could not resolve hostname.. Name or service

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
davidstar58

[solved] ssh: Could not resolve hostname.. Name or service

Post by davidstar58 »

I'm trying to set up a ssh tunnel over the Internet to a forwarded port with this command

Code: Select all

ssh -L xxxx:localhost:xxxx someone@something.dyndns.org:xxxx
with the correct info for the X's and user@hostname:port when I try this I get

Code: Select all

Could not resolve  someone@something.dyndns.org:xxxx: Name or service not known
I can ping the IP without the port number but with the port number it gives this response

Code: Select all

ping: unknown host xxx.xxx.xxx.xxx:port
I can connect within my own LAN but if i try to goto WAN (the Internet ) it gives me the same error

I have tried this on two Linux machines

a gateway laptop running mint 10

and an abit nf7 running Ubuntu 10.4 LTS

they both have the same /etc/ssh/ssh_config file

I think it is a DNS problem but cant find an answer by searching goggle with

Code: Select all

Could not resolve  Name or service not known
or
Could not resolve host
or
 Name or service not known 


I hope i have provided enough detail to explain my problem I am sure it is simple but I can't figure it out so
any help would be greatly welcomed

Dave

Update

i just tried to log in via ssh to my remote computer running mint 10 with my windows box using putty and it works just fine
It looks like both routers are configured to work with ssh being port forwarded but Linux can't resolve the DNS
where would i go to change this
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
davidstar58

Re: ssh: Could not resolve hostname.. Name or service not kn

Post by davidstar58 »

I found the solution or at least a work around

Code: Select all

ssh -p port# -L xxxx:localhost:xxxx someone@something.dyndns.org
Dave
Locked

Return to “Networking”