Edit remote files with local editor using ssh and sshfs


  1. apt-get -y install sshfs
  2. Add your local user to the fuse group
  3. mkdir ~/mylocaldir
  4. sshfs -o idmap=user mylocaluser@myremoteserver.com:/remotepath ~/mylocaldir
  5. Edit files under ~/mylocaldir, and as you save them, they are automatically updated in /remotepath
Note: the "-o uid=500" can be used if you get permission errors, but replace "500" with you local id number

Errors
  1. "Couldn't read packet: Connection reset by peer"
    1. change this line in your /etc/ssh/sshd_config file to match what's here
      1. Subsystem sftp internal-sftp
    2. happens on RedHat Enterprise 6.1 for sure

Comments

Popular posts from this blog

Openvpn and unbound combined break dig command

Stress Linux system: stress-ng

Google Nexus 4: permanent back panel glass repair for less than a penny