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...
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.
On the server side; ]# cat /etc/exports
]# rpcinfo -p
program vers proto port
The on the client side I use 2 ssh tunnels;
]# ssh -f -N -L 52051:localhost:2051 my.server
]# ssh -f -N -L 52049:localhost:2049 my.server
I can telnet to these ports and receive a response. So now I try to mount;
]# mount -t nfs -o nolock,port=52049,mountport=52051 localhost:/home/Shared /mnt/Shared
mount.nfs: mount to NFS server 'localhost:/home/Shared' failed: RPC Error: Program not registered
So it seems 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.
I am using SUSE 11.2 for the client and Ubuntu 10.04 as the server.
If I may ask, why are you trying to use NFS, tunneled through SSH?
Have you tried using SSHFS? All it requires, on the server end, is SSH.
answered 24 Aug '10, 21:13
As you would have to map several ports simultanously, tunneling through ssh doesn't seem as a practical solution to me. Rather, I would use a VPN. You could even use a SSH VPN if the server on the target host is recent enough.
answered 04 May '11, 09:19
OK, NFS is a means to access remote files as local.
As I mentioned before, if you want to use NFS no matter what, you'll need to route it somehow and that boils down to using a VPN (my first choice in this case: OpenVPN). If you are not married to the idea of NFS, there are alternatives. For example, you can use sshfs, a FUSE driver that uses sftp to emulate a remote volume mount where you can do basic file operations: create, remove, edit, move, open, close, etc. It won't be as fast but it will get the job done. Even midnight commander over ssh, already mentioned here, is a good choice that I'd combine with zssh for quick file transfers if sftp is not an option.
answered 19 May '11, 08:04
I can't use sshfs in my environment, does anyone have an answer to this one? I get the same error.
answered 27 Oct '10, 11:18
I might be totally misunderstanding what you are driving at, since I have never used NFS in this way.
But if you have SSH access to the server where the files are, why not make things simple on yourself, and fire up mc (The Midnight Commander)?
Click on Right -> Shell link -> enter user@hostname and hit Enter.
It should either prompt you for a password, or if you have passwordless login setup, it should just give you access in the Right panel to the server.
Then, you can do whatever files operations you need to do.
Of course, if you are doing something fancier than this, just forget I said anything. :)
answered 18 May '11, 14:27