LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   ssh and dyndns.org query (https://www.linuxquestions.org/questions/slackware-14/ssh-and-dyndns-org-query-636225/)

andrew.46 04-18-2008 08:13 AM

ssh and dyndns.org query
 
Hi,

I have a dyndns.org dynamic dns address allocated to my router and ssh is working fine. Only problem I have is that the following syntax:
Code:

$ ssh ****.dyndns.org -l andrew
seems to call up the old ip address for my dynamically allocated address. To be a little clearer it calls up:

Code:

andrew@ilium~$ ssh -vvv i*****.dyndns.org -l andrew
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to *******.dyndns.org [59.101.23.106] port 22.

where 59.101.23.106 is the original ip address, long since changed by my ISP. There must be a setting to force ssh to look for the new IP address?

Andrew

MS3FGX 04-18-2008 08:18 AM

The problem isn't on the software side, it is with DynDNS. Either there is a delay in updating their DNS servers, or your router is not relaying the IP to the DynDNS site often enough (or at all).

andrew.46 04-18-2008 08:55 AM

Hi,

Thanks for the reply:

Quote:

Originally Posted by MS3FGX (Post 3125205)
The problem isn't on the software side, it is with DynDNS. Either there is a delay in updating their DNS servers, or your router is not relaying the IP to the DynDNS site often enough (or at all).

I suspect as you mention the problem must be dyndns DNS. The actual IP address of my router agress with the ip address given on their web site and I can ssh using this ip address. But the name ****.dyndns.org gives the old ip address.

Logical when you think it through. If this is the case I need simply wait :-)

Andrew

acummings 04-18-2008 12:58 PM

There is the known_hosts file which stores past ssh transaction info

But perhaps this file doesn't store hostname/IP combo? (which if parsed [as maybe is yes indicated by the ssh_config] would send it over and over again forever to only the one IP that recorded when this new record was added to known_hosts

You could make a backup copy of known_hosts then delete ~/.ssh/known_hosts

Then you'd be starting anew (to discover if it then records/keeps the current IP)
--

al@AB60R:/etc/ssh$ pwd
/etc/ssh
al@AB60R:/etc/ssh$ lsg h_co
ssh_config

next copy/pasted from /etc/ssh/ssh_config

# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

"2. user-specific" to me would mean the next file (known_hosts) in my /home

al@AB60R:~/.ssh$ pwd
/home/al/.ssh
al@AB60R:~/.ssh$ ls
known_hosts
al@AB60R:~/.ssh$


in that known_hosts are any former ssh transaction

I think (can't remember for certain) in the past I have deleted this known_hosts file and let it start over again (whenever some data in it had become outdated or in need of updating).

I think (can't remember for certain) that once (a record of) a host gets in this file that such record then never changes (would always go for the same IP address again and again forever)

when ssh, I think (not certain) it 1st checks this file -- even if you go to ssh to a *new one* (one that had not ever ssh'd to before) -- in the case of *new* is when a new record gets added to this file.

--
Alan.

andrew.46 04-18-2008 07:13 PM

Thanks acummings for your detailed reply. After having slept off a few frustrations with this matter I tested the whole setup again and the culprit was definitely a slow dyndns.org dns record. I tested this morning as follows:

1. Took note of the router's external IP address and checked that this tallied with the known_hosts file, which it did.

2. Rebooted the router and noted the new external IP address allocated by my ISP.

3. Used ssh -vvv on my dyndns.org address.

The results showed that in this instance I logged on to the dyndns with the new IP number with no problem and there was also new entry in known_hosts with the same name but different IP address.

Wonderful what 8 hours sleep can do :-)

Andrew


All times are GMT -5. The time now is 03:43 PM.