NFS over SSH. RPC Error
<p>Hi,</p>
<p>I have seen many articles saying that to get rid of this error I should be using portmap, that's fine but how do I use it over ssh...</p>
<p>I am trying to mount NFS over SSH. I have the server configured to export the share and I can mount it correctly over the network, however company policy is to ONLY allow ssh access.</p>
<p>On the server side;
]# cat /etc/exports</p>
<p>/home/Shared localhost(rw,no_root_squash,async)</p>
<p>]# rpcinfo -p</p>
<p>program vers proto port</p>
<pre><code>100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 49449 status
100024 1 tcp 36697 status
100021 1 udp 34934 nlockmgr
100021 3 udp 34934 nlockmgr
100021 4 udp 34934 nlockmgr
100021 1 tcp 37221 nlockmgr
100021 3 tcp 37221 nlockmgr
100021 4 tcp 37221 nlockmgr
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100005 1 udp 2051 mountd
100005 1 tcp 2051 mountd
100005 2 udp 2051 mountd
100005 2 tcp 2051 mountd
100005 3 udp 2051 mountd
100005 3 tcp 2051 mountd
</code></pre>
<p>The on the client side I use 2 ssh tunnels;</p>
<p>]# ssh -f -N -L 52051:localhost:2051 my.server</p>
<p>]# ssh -f -N -L 52049:localhost:2049 my.server</p>
<p>I can telnet to these ports and receive a response.
So now I try to mount;</p>
<p>]# mount -t nfs -o nolock,port=52049,mountport=52051 localhost:/home/Shared /mnt/Shared</p>
<p>mount.nfs: mount to NFS server 'localhost:/home/Shared' failed: RPC Error: Program not registered</p>
<p>So it <em>seems</em> as if the problem is caused by mount talking to the local portmap, however I thought the mount options were supposed to stop that. Obviously I cannot forward portmapper from the server to the client's port 111 as that would disrupt the client's portmapper.</p>
<p>I am using SUSE 11.2 for the client and Ubuntu 10.04 as the server.</p>