Linux NFS development
 help / color / mirror / Atom feed
* Problems getting NFS over SSH to work
@ 2005-05-31 21:45 Julius Schwartzenberg
  2005-06-27 16:44 ` Peter Åstrand
  0 siblings, 1 reply; 2+ messages in thread
From: Julius Schwartzenberg @ 2005-05-31 21:45 UTC (permalink / raw)
  To: nfs

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  mountd

Is 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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problems getting NFS over SSH to work
  2005-05-31 21:45 Problems getting NFS over SSH to work Julius Schwartzenberg
@ 2005-06-27 16:44 ` Peter Åstrand
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Åstrand @ 2005-06-27 16:44 UTC (permalink / raw)
  To: Julius Schwartzenberg; +Cc: nfs

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1955 bytes --]

On Tue, 31 May 2005, Julius Schwartzenberg wrote:

> '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.


> 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.

-- 
Peter Åstrand		Chief Developer
Cendio			www.thinlinc.com
Teknikringen 3		www.cendio.se
583 30 Linköping        Phone: +46-13-21 46 00

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-27 16:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-31 21:45 Problems getting NFS over SSH to work Julius Schwartzenberg
2005-06-27 16:44 ` Peter Åstrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox