MMNCS.COM
  • Web
    • WordPress
    • Joomla
    • Drupal
  • Tips & Tricks
    • Youtube
    • WordPress
    • Windows
    • Web
    • Twitter
    • Linux Ubuntu
    • Google
    • Facebook
    • Drupal
    • Developer
    • Designer
    • Apple
  • Tech News
    • Windows Phone
    • Servers
    • Search Engines
    • Nokia
    • Microsoft
    • iPhone
    • Google
    • Facebook
    • Browsers
    • Apple
  • Social Media
    • Youtube
    • Yahoo
    • Twitter
    • Google+
    • Facebook
  • Server
    • Web Server
      • NGINX
      • Apache Web Server
    • Ubuntu
    • Security
      • Access Control
    • Mail Server
    • Hosting
    • FTP Server
    • Firewall
    • Database
      • MySQL
    • Backup
  • SEO
    • Yahoo Search
    • Google Search
    • Google AdSense
    • Bing
  • Off-Topic
    • Weird
    • Music
    • Fun
    • Documentaries
  • Mobile
    • Windows Phone 7
    • iPhone
    • Android
  • Google
    • Google Translate
    • Google Plus
    • Google PageRank
    • Google Adwords
    • AdSense
  • Design & Dev
    • Webdevelopment
    • Version Control
      • Git Version Control
    • Programming
    • PHP
    • JavaScript
    • HTML
    • Development Environment
    • CSS

Related

  1. How To Setup UncomplicatedFirewall ufw on Linux ubuntu 10.04 and 11.04 and other Debian distributions [Server Setup]
  2. How to setup a firewall using Shorewall on Linux Ubuntu 11.04 and other Debian based distributions
  3. How to setup an FTP Server with virtual users (no accounts) using VSFTPD on Linux Ubuntu 10.04 & 11.04 [ FTP Server Setup]
  • Share on Tumblr

How To Setup Openssh-sftp-server on Synology NAS and connect using sshfs from your Linux Server

by MMNCS on July 10th, 2011, updated October 23, 2011
thumb_Synology_logo-backup-opensshfs-server-setup-install-configuration

This guide shows how to setup Openssh-sftp-server on Synology NAS and connect using sshfs from your Linux Webserver.

 

It’s a bit of a drag that Synology hasn’t included the OpenSSH Server, but it is not that difficult to do and when it’s done you have secure and easy access to your Synology NAS.

 

See also how to use Tartarus to backup your Webserver: How to Install and Setup a backup system on Linux Unbuntu 11.04 and Debian based systems using Tartarus

Install Openssh

Method 1

  • Install ipkg following the following instructions.
  • reboot
  • ipkg update
  • ipkg install openssh-sftp-server
  • Edit /etc/ssh/sshd_config with the following:
# override default of no subsystems
#Subsystem sftp /usr/libexec/sftp-server
Subsystem sftp /volume1/@optware/libexec/sftp-server
  • To edit this file use this command: ‘vi /etc/ssh/sshd_config’
  • Use pagedown to go to scroll down the file until you see the ‘#override default of no subsystems’ and press Insert on your keyboard to enter edit mode
  • After you changed the settings press Escape and then ‘:wq’ to save and exit the file
  • reboot
  • Finished, using sftp client software on your PC you will now be able to connect to your NAS by sftp.

Method 2

This method is NOT recomended for most users. Only use this method if you have a specific reason for needing to do so.

Taken from the official forum. This method describes how to add sftp-server option to an existing DS with only the stock Synology ssh installed. This does not install the openssh package found in the IPKG repository. First of all, you need to get IPKG, read the guidelines inthere and proceed with the below.

Step 1. Getting sftp-server

mkdir /tmp/sftp_patch
cd /tmp/sftp_patch
ipkg download openssh-sftp-server
tar -xvzf openssh-sftp-server_*.ipk
tar -xvzf data.tar.gz
mv ./opt/libexec /usr

Step 2. Getting zlib

mkdir /tmp/zlib_patch
cd /tmp/zlib_patch
ipkg download zlib
tar -xvzf zlib_*.ipk
tar -xvzf data.tar.gz
mv ./opt/lib/libz.so.1.2.5 /lib
cd /lib/
ln -s libz.so.1.2.5 libz.so
ln -s libz.so.1.2.5 libz.so.1

Step 3. Cleanup the temp files

rm -rf /tmp/sftp_patch /tmp/zlib_patch

When having executed the above, you are able to make sftp connections to your DS.

Step 4. Fix missing libs

If sftp does not work try to start the sftp module on the command line like:

/usr/libexec/sftp-server

See if this reports any errors, on a DS207+ running firmware DSM 2.2-0942 it would report a libcrypto.so not found like:

/usr/libexec/sftp-server: error while loading shared libraries: libcrypto.so.0.9.8: cannot open shared object file: No such file or directory

Correct this by adding a symbolic link

cd /lib/
ln -s libcrypto.so.1.0.0 libcrypto.so.0.9.8
<h3>Step 5. Check sshd_config</h3>
In order for the sftp server to start automatically with boot/ssh daemon, this must be viewed as part of the /etc/ssh/sshd_config
<pre># override default of no subsystems
Subsystem       sftp    /usr/libexec/sftp-server

 

Install sshfs on server

This short tutorial describes how partitions can by copied as image to another server with the rescue system,sshfs and partimage.

To mount a foreign directory on a server using ssh, you need to install sshfs in the rescue system and load thefuse module.

apt-get update
apt-get install sshfs
modprobe fuse

 

Connect and mount
Now a directory from a remote server can be mounted encrypted.

sshfs username@remote.host:/directory/on/remote/server/ /mnt

You may be interested in

  1. How to use Putty or MSysGit on Windows to login securely on Linux via OpenSSH with public and private key pairs
  2. How to setup an FTP Server with virtual users (no accounts) using VSFTPD on Linux Ubuntu 10.04 & 11.04 [ FTP Server Setup]
  3. How to install and setup a Git Repository Server using Gitolite on Linux Ubuntu 11.04 or 10.04 with Windows clients using MSysGit
  4. How To Setup UncomplicatedFirewall ufw on Linux ubuntu 10.04 and 11.04 and other Debian distributions [Server Setup]
  5. How to setup a firewall using Shorewall on Linux Ubuntu 11.04 and other Debian based distributions

support and subscribe to the site

Follow @mmncs
Posted in Backup, Hosting, Server, Ubuntu Tags: 2011, Apache Web Server, Backup Data Solution, Backup Files and Folders, configuration, Dedicated Server, ftp server setup, Guide, Install, Linux, Linux Ubuntu, NAS, Online Learning, openssh, Openssh-sftp-server, security, SSFS, SSH Web Server, Synology, VPS
« How to protect Apache against DOS,DDOS or brute force attacks using mod_evasive and mod_security and mod_qos on Linux Ubuntu 11.04
Tricks and tips to secure your Apache Webserver using Linux Ubuntu »


Comments

You can leave a response, or trackback from your own site.
  1. 13-7-2011
    Kena Kahawai

    Awesome article =) cheers!

    Reply

Leave a Reply

Click here to cancel reply.

Trackbacks & pingbacks

    Search terms for this article

    • enable sftp on synology,
    • synology 4.0 sshfs,
    • synology get access ftp to linux,
    • how install sftp-server on linux 10.04,
    • add extensions to synology webserver,
    • ftp client on synology,
    • synology nas ftp server,
    • synology sftp serveur,
    • synology install scp,
    • setup ssh server on synology,
    • ssh dsm 3.2,
    • win 7 join synology directory server,
    • scp libcrypto.so.1.0.0,
    • how to secure nas synology#q=how to secure nas synology,
    • ssh ftp server synology,
    • how to setup a ftp-server in synology,
    • dsm 3.2 openssh,
    • dsm 3.2 ipkg,
    • adres synology server ubuntu,
    • synology add key ssh dsm 3.2,
    • install git on synology ssh keys,
    • synology tips tricks,
    • how to install ubuntu server in nas synology,
    • nas sshfs: not found,
    • how to ubuntu as nas server,
    • sftp synology url,
    • synology backup to linux server,
    • synology sftp guide,
    • synology sftp private key,
    • connect server ubuntu 11.04 sftp,
    • Subscribe

      Find MMNCS.COM on Facebook, about guides, tutorials and learning within webdevelopment, drupal, MySQL, PHP, WordPress, SEO...
      Follow MMNCS.COM on Twitter and get the latest updates
      Follow @mmncs
      Subscribe to MMNCS.COM newsletter, about guides, tutorials and learning within webdevelopment, drupal, MySQL, PHP, WordPress, Programming, Technology, SEO...
    • The Best technology news guides tips tricks on the Internet
    • best online art gallery, paintings, illustrations, fine art photography
    • Services

      Check your Google PageRank checker optimize seo serp page rank
      Take a picture of any website, WordPress Screenshot demo
    • Latest

      Facebook Helps Breakup on One-Third of Marriages in the U.K.

      Facebook Helps Breakup on One-Third of Marriages in the U.K.

      December 30th, 2011

      Husbands and wives in the United Kingdom headed for divorce are increasingly citing Facebook in thei[...]

      Nokia Lumia 800 Demo of Skyscanner. Flight Deals Search for Windows Phone

      Nokia Lumia 800 Demo of Skyscanner. Flight Deals Search for Windows Phone

      December 30th, 2011

      Here's another awesome application for the Nokia Lumia 800 and other Windows Phones. Skyscanner allo[...]

      Nokia Lumia, Samsung, HTC rumored to announce LTE Windows Phone smartphones at CES

      Nokia Lumia, Samsung, HTC rumored to announce LTE Windows Phone smartphones at CES

      December 29th, 2011

      Rumor has it that the one thing that is notoriously missing (well, one of the things) from any Wind[...]

      Why I’m Replacing My iPhone With Nokia Lumia 800 And Why Android Is No Option

      Why I’m Replacing My iPhone With Nokia Lumia 800 And Why Android Is No Option

      December 7th, 2011

      Spoiler alert: This article is about how great the new Nokia Lumia 800 is, so if you are an iPho[...]

      Apple iPhone 4S Battery Drain Is Starting To Become A Serious Issue [iOs 5]

      Apple iPhone 4S Battery Drain Is Starting To Become A Serious Issue [iOs 5]

      November 29th, 2011

      Waiting on the next expected fix from Apple, iPhone 4S users complaining of rapid battery drain are [...]

    • musicfordriving com music for driving underground experimental electronic electronica dj rock jazz upcomming interesting music hot list hype
    • Selected

      Bill Gurley; Too Many Start-Ups Chase Too Little Cash

      Bill Gurley; Too Many Start-Ups Chase Too Little Cash

      November 14th, 2011

      Venture capitalist Bill Gurley has noticed something new this autumn: a big jump in the number of wh[...]

      The Best Programming Contest Ever Made – The AI Challenge Ants 2011 [Developer]

      The Best Programming Contest Ever Made - The AI Challenge Ants 2011 [Developer]

      October 30th, 2011

      The best programming contest ever made! Well that is what they state. The AI Challenge Ants 2011 is [...]

      Take A Picture Of Any Website [WordPress Screenshot Demo]

      Take A Picture Of Any Website [WordPress Screenshot Demo]

      October 28th, 2011

      Take a picture of any website. Just enter the website address in the form and press the button "Take[...]

      Optimize Your Time And Write Better CSS With {less} – [CSS Stylesheets]

      Optimize Your Time And Write Better CSS With {less} - [CSS Stylesheets]

      October 23rd, 2011

      If you think parts of CSS is repetitive, tedious, and … well, very boring. Have a look here. LESS [...]

      Call Your Friends For Free –  Cut The Expensive Voice And Text Plans To The Bare Minimum [Mobile Apps]

      Call Your Friends For Free - Cut The Expensive Voice And Text Plans To The Bare Minimum [Mobile Apps]

      October 14th, 2011

      After been using Viber for some time now. We highly recommend this mobile application for all smartp[...]

    • News

      Facebook Helps Breakup on One-Third of Marriages in the U.K.

      Facebook Helps Breakup on One-Third of Marriages in the U.K.

      December 30th, 2011

      Husbands and wives in the United Kingdom headed for divorce[...]

      Nokia Lumia 800 Demo of Skyscanner. Flight Deals Search for Windows Phone

      Nokia Lumia 800 Demo of Skyscanner. Flight Deals Search for Windows Phone

      December 30th, 2011

      Here's another awesome application for the Nokia Lumia 800 and[...]

      Nokia Lumia, Samsung, HTC rumored to announce LTE Windows Phone smartphones at CES

      Nokia Lumia, Samsung, HTC rumored to announce LTE Windows Phone smartphones at CES

      December 29th, 2011

      Rumor has it that the one thing that is notoriously missing[...]

    • Social Media

      Solved: Facebook XFBML Like Button Bug Creates a Vertical Scroll-Bar [Web Developer]

      Solved: Facebook XFBML Like Button Bug Creates a Vertical Scroll-Bar [Web Developer]

      September 16th, 2011

      After been doing a lot of work on the site I noticed when testing in IE8 and Firefox 3.6.x that I wa[...]

      Add a Cool Google Plus Profile Add to Circles Widget to Your Website [Google Plus]

      Add a Cool Google Plus Profile Add to Circles Widget to Your Website [Google Plus]

      August 11th, 2011

      Google Plus has created a very simple widget to embed your Google Plus profile on websites. This wid[...]

      How To Export All Your Facebook Friends To Google+ Using Yahoo Mail [Google+]

      How To Export All Your Facebook Friends To Google+ Using Yahoo Mail [Google+]

      August 8th, 2011

      Since the popular Chrome extension Facebook Friends Exporter got blocked we needed another way of ge[...]

    • Google

      Check Your Google Page Rank Here – Updated To Use The New Google PageRank Query URL

      Check Your Google Page Rank Here - Updated To Use The New Google PageRank Query URL

      October 8th, 2011

      Check PAGE RANK of Web site pages Instantly This is a free service to check Google™ page rank ins[...]

      Add a Simple Google Translate DropDown Box To Your Web Site [Tips & Tricks]

      Add a Simple Google Translate DropDown Box To Your Web Site [Tips & Tricks]

      September 6th, 2011

      Google Translate is the best free online translation service today and I often wonder why I rarely s[...]

      Google Closes Down 10 Mayor Business Areas [Tech News]

      Google Closes Down 10 Mayor Business Areas [Tech News]

      September 5th, 2011

      Google closes down 10 business areas in which the company itself calls "autumn-cleaning."The cle[...]

    • Home
    • About
    • Contact
    Copyright © MMNCS.COM is a site aimed at web developers, system engineers and designers offering tutorials and articles on technologies, skills and techniques to improve how you design and build websites. We cover Open Source recommendations, Linux Server guides, PHP, HTML, CSS, Drupal & WordPress Tutorials, Guides, Tips & Technology News.