SSHFS (SSH Filesystem) allows you to mount a filesystem from another host over SSH. This is useful for accessing remote directories as if they were local.
Install SSHFS:
You can install fuse-sshfs from the EPEL repository.
dnf --enablerepo=epel -y install fuse fuse-sshfs
Create a Local Mount Point:
For example, to mount a remote directory to ~/sshmnt:
mkdir ~/sshmnt
Mount Remote Directory:
Use SSHFS to mount the remote directory.
sshfs user@remote_host:/remote/directory ~/sshmnt
Example:
sshfs node01.emc.world:/home/cent/work ~/sshmnt
Enter the user's password when prompted.
Check Mounted Filesystem:
Use df -hT to verify the mounted filesystem.
df -hT
Look for an entry similar to node01.emc.world:/home/cent/work in the output, indicating the mount is successful.
Unmount SSHFS:
When finished, you can unmount the filesystem.
fusermount -u ~/sshmnt
Alternatively, you can use the umount command.
Note: Replace user@remote_host, /remote/directory, and node01.emc.world:/home/cent/work with actual user names, remote host addresses, and remote directories relevant to your setup. Ensure that the remote directories have the appropriate permissions for access.