On 11 Oct 2003 17:06:03 -0700, Steve <(E-Mail Removed)> wrote:
> Hello all, I have a couple of questions. First, is it possible to
> mount a remote directory via ssh or ftp or the like? How would one do
> this? I would like to mount my school account directory to my
> machine, and this seems like the way to do it <?> Also, Since my
> school uses DHCP to assign IP addresses, every time I reboot I get a
> different IP, which is a little inconveinient since I have a
> dual-boot, and reboot more than occasionally. I know the first three
> numbers of my IP address never change, but the fourth one does. Is
> there some way to determine the last number if I know my MAC address,
> possibly through the ARP protocal?
>
> -Steve
If your school allowed one to NSF mount, and its sshd allowed port
forwarding you could. You would need the help of someone who had
administration privileges on the school machine to set up things
like /etc/exports. Thats assuming your school machine is a unix
system. If its a windows server, you'll have to learn SAMBA.
There are several methods for getting your IP address. ARP
wouldn't be easy.
You could run ifconfig about the proper interface and
pull it out of there.
I use the following line in my firewall setup
CURRENTIP=`ifconfig eth1 | perl -ne 'print "$1\n" if /inet addr

[^ ]+) /'`
Depending on your DHCP client, the address it gets is usually
saved somewhere. I use dhcpxd, which I think isn't widely used
by most distributions. It saves the info in a file named
something like /etc/eth1.current
If you are extracting it to send over ssh to inform something
on the school side of your IP, and easy way to get the IP is to read
it from the environment variable that sshd sets, SSH_CLIENT.
That contains the IP and port for your home machine, and the
listen port of sshd.