Monday, January 9, 2012

Mount remote machine file system on local machine through ssh

SSH (Secure Shell) is a network protocol that allows secure communication between two network devices. Normally, we use ssh to access Linux and Unix based system shell remotely. But we can also use ssh to mount remote machine file system on local machine. For that you need to install SSHFS packaged on your machine. SSHFS is a filesystem client based on the SSH File Transfer Protocol.
Install sshfs via YUM,

# yum install sshfs -y

 
Or install sshfs via APT,

# apt-get install sshfs

 
If you want to mount /root partition of 192.168.0.1 server then,
First create a mount point


# mkdir /mnt/root

 
Then run sshfs as,


# sshfs root@192.168.0.1:/root /mnt/root

 

No comments:

Post a Comment