Remote mount on any Redhat server

How to remotely mount another Redhat server and cp some file into it ?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

andreasSystem AdminCommented:
You have several possibilities.

most easy and less trouble to setup would be sshfs.

just install fuse and sshfs on the accessing machine, the remote machine just needs ssh running and accessible from the outside.

sshfs user@remote:/path/to/mount /mountpoint

cp [desired options ] /files/to/copy/* /mountpoint

fusermount -u /mountpoint

to umount once finished.

sshfs and fusermount will work as normal user, no need for root.

Other way would be to setup a nfs server on the server and export the directries via nfs. But this is more difficult to setup, more insecure and troublesome if there are firewalls in the path between server and client.
AXISHKAuthor Commented:
Is there anything missing on Server B or A ? Tks

On Server B (client)
# mount serverA:/home/sciadm    /mnt
mount: mount to NFS server 'serverA' failed: RPC Error: Program not registered.

On  Server A (File Server)
-bash-3.2# yum list | grep nfs
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.

Error Message:
        Please run rhn_register as root on this client
Error Class Code: 9
Error Class Info: Invalid System Credentials.
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

nfs-utils.i386                           1:1.0.9-71.el5_11             installed
nfs-utils-lib.i386                       1.0.8-7.9.el5                 installed
andreasSystem AdminCommented:
What does

showmount -e <IP of Server A>
rpcinfo -p <IP of a>


Can you see the exported filesystem with showmount?
does rpcinfo -p shows the mountd and nfs processes and ports?

Infos on daemons necessary running on the server A for an NFS export can be found here:

For the rhn_network error, you need to re register your machine, this requires a valid and running support contract for the machine.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Gerwin Jansen, EE MVETopic Advisor Commented:
Do you really need a mount?  Just scp for a few files would be easier.
AXISHKAuthor Commented:
On Server A (File server)
-bash-3.2# showmount -e
mount clntudp_create: RPC: Program not registered
-bash-3.2# rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp    641  status
    100024    1   tcp    644  status

So, I need to install yum install nfs on server A, correct ? Any more guildeline on this ? Tks
andreasSystem AdminCommented:
You need to install all necessary things for the nfs server (nfs-file-server). Dont know the exact package name(s) for this on redhat.

afterwards you need to start the nfs server and export the filesystems.

portmap list should show mountd, statd, and several nfs things once its successfully installed and activated.
andreasSystem AdminCommented:
Thus i was suggesting using sshfs, as its much less trouble to setup. Especially if this copy is only a single time thing and not permanent then NFS would be overkill, also consider to use scp as suggested by Gerwin Jansen. You might tar things b4 scp and then just copy over the single tar ball of the files.
AXISHKAuthor Commented:
Can I use yum install on my RedHat , or I need to solve the registration issue first ? Tks
andreasSystem AdminCommented:
This i dont know, if you install works without proper rhn registration. We are using the free ScientifixLinux RHEL-clone. No RHN needed there just plain yum repository configuration.

just try it out and see if you get any error messages when run

yum isntall packetname
AXISHKAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.