Problems getting NFS over SSH to work
Subsystems (2)
Hi,
I've got a server & client on a campus network on which it is easy to 'overtake' another computer by spoofing it's MAC address. Since I would like to access the server easily from my workstation, I thought NFS over SSH would be a good solution. The server uses Slackware 10.1, the workstation uses Slackware 10.0 with some updates including kernel 2.6.9.
I installed UNFS3 version 0.9.12 on the server and I followed the exact instructions from the NFS how-to on how to set up the tunnel over SSH. When I run the mount command on my client, I get the following error message though:
mount: RPC: Cannot receive; errno = Connection refused (translated from dutch)
Everything works fine when I try to do the mount on the server itself though, so that seems to be working.
My /etc/exports file has this:
/ localhost(rw)
rpcinfo -p gives me on the server:
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100003 3 udp 2049 nfs
100003 3 tcp 2049 nfs
100005 1 udp 32767 mountd
100005 3 udp 32767 mountd
100005 1 tcp 32767 mountd
100005 3 tcp 32767 mountdIs there any way I can see what is going on (and what might be going wrong) with the SSH tunnel? Thanks in advance,
Julius
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Quoted 1 line · Julius Schwartzenberg
'overtake' another computer by spoofing it's MAC address. Since I would like to access the server easily from my workstation, I thought NFS over SSH would be a good solution. The server uses Slackware 10.1, the workstation uses Slackware 10.0 with some updates including kernel 2.6.9. I installed UNFS3 version 0.9.12 on the server and I followed the exact instructions from the NFS how-to on how to set up the tunnel over SSH.
UNFS3 is a good choice. However, the section about SSH tunneling in the NFS Howto is wrong in several ways. Also, it assumes that you are using the knfsd implementation.
Quoted 1 line
When I run the mount command on my client, I get the following error message though: mount: RPC: Cannot receive; errno = Connection refused (translated from dutch)
It would help if you posted the exact unfsd and ssh command lines. For me, this works:
1. Create an exports file on the remote machine. I'll use /home/peter/exports, with:
/home/peter 127.0.0.1(rw,password=mysecret)
2. On the client, run:
ssh -L 12049:localhost:12049 peter@ourserver unfsd -d -e /home/peter/exports -n 12049 -m 12049 -p -s -l 127.0.0.1
3. On the client, as root, run:
mount -o port=12049,mountport=12049,mountvers=3,nfsvers=3,nolock,fg,soft,intr,tcp localhost:@password:mysecret/home/peter /mnt
The examples above assumes that port 12049 are free both on the server and the client.
If you have multiple users on the client machine, the password will be visible in the "mount" output. You can use one time passwords to prevent this. See the unfs3 documentation.
I've been thinking about writing some wrapper scripts that simplifies all this. NFSv3 over SSH actually works quite nice.
Signature · 4 lines
Peter Åstrand Chief Developer Cendio www.thinlinc.com Teknikringen 3 www.cendio.se 583 30 Linköping Phone: +46-13-21 46 00