This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Accessing remote PC (ssh?)


Larry Hall (Cygwin) wrote:
Charles D. Russell wrote:
I suppose I'll have to repeat this every time DHCP changes the IP addresses.

Correct. Unless your router allows you to associate a dynamic IP with your MAC address (i.e. static DHCP). The poor man's workaround for this, assuming that you don't want to give up on DHCP, is to create a wrapper script for ssh that removes the known_hosts file and then calls ssh. It will be a little noisier, but it should work. The alternative is to figure out what setting in your router is screwing up DNS resolution. I suppose you could be getting lost even before you get there too. You could check your network settings under Windows to see if it properly points to your router for DNS.

Um, what are the chances this router even *does* dns resolution? Remember, for it to do DNS resolution means it has a full DNS server in it and that it allows adding DNS entries for the local network (however it resolves that!) and also that Charles has set this up, and that it works with DHCP... um, which means that it is somehow dynamic updating based on the MAC address, and...


...what is the likelihood that a $50 piece of hardware does all this? More likely the only name resolution that ever worked on this network is NetBIOS.

First off, DNS with dynamic IP's is... weird. Or at least unusual. IMO the smart thing to do in this case is to assign static IP's to as many computers as possible (or at least set up DHCP to hand out "static" IP's based on MAC address), and then add those to /etc/hosts. Any others will just have to be addressed by IP address only (use Windows' 'ping' to look them up via NetBIOS resolution if that is helpful). That, or run a real DNS server on whichever /computer/* is most reliably available. Oh, and that one at least needs a static IP. :-)


So... simplest solution: 'ping' each computer first to learn it's IP address, then ssh to that. Nuke known_hosts every now and then if needed.


Next best: see if your DHCP supports leasing static addresses by MAC. This works great with Knoppix/etc because the physical NIC always gets the same (and thus well-known) address. Add these to /etc/hosts to make your life easier. (This is what I do on my own home network, except I have a box running Linux instead of an appliance.)

Next best: Bite the bullet and assign static IP addresses. Add to /etc/hosts as above. If you're careful/lucky, you can use addresses outside the range your DHCP hands out, so that non-static-IP setups still work. (In reality they *probably* won't even if your ranges overlap, but that isn't a guarantee.) Make sure they are on the right subnet, of course.

Most complicated: Set up a box running Linux off the HD (it also needs to be always-available and have a static IP), use *that* for DHCP so that you can definitely do as in solution #2, and also run a DNS daemon on it. Then you can set up Real Dynamic Name Resolution if you like... or just stick to DHCP-assigned-static-IP-by-MAC with static DNS. Make sure the DHCP config hands out this box as the DNS server. (In theory you could still use your appliance for DNS if you want to go the dynamic DNS route if you can get the dynamic routing stuff to work AND you can make your appliance identify this box as the DNS server. But setting up dhcpd on Linux is just soooo easy :-).)

--
Matthew
Caution: keep out of reach of adults.


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]