sshd and dhcp bind to specific address

Robert Huff roberthuff at rcn.com
Wed Aug 5 22:43:15 UTC 2009


Glen Barber wrote:

>> my pc gets ip address from dhcp server,
>> but on my pc, there is running
>> sshd.
>>
>> I want to make ssh to listen to only one
>> ip address, but if ip changes due to dhcp,
>> ssh server do not work properly.
>>
>> I know, that dhcp is able to assign ip address
>> to client from some range e.g. 192.168.0.1-254
>> It is possible to do the same with ssh in case
>> that it is not possible to do it only with one ip?
>>
> 
> Is this a local network, inside 192.168.0.0/24 ?  Are you able to
> configure a static IP for this machine?
> 
> If not, I wrote a little script that runs every 15 minutes via cron(8)
> which gets my IP address, performs a diff(1) against a static file
> containing the current IP.  If the IP is different, it mails me the
> new IP.  However, this assumes that outside access is the problem,
> not internal access.

	I have a set of scripts I run when I know I have been handed a 
different address; they're not pretty, but they change the IP for 
sshd.conf and various stuff in bind.


			Robert Huff


More information about the freebsd-questions mailing list