Koozali.org: home of the SME Server

SFTP or FTP Access

Offline genisys

  • *
  • 46
  • +0/-0
SFTP or FTP Access
« on: May 22, 2012, 11:38:33 PM »
Hello all -

I am trying to set up our SME server v7.2 to allow either SFTP or FTP access. At this point I am able to use either OUT of the server at the console, but cannot do either in from my PC using an emulater. I have the correct settings in server-admin, but still cannot get in and am receiving a  ssh: connect to host 192.168.10.2 port 22: Connection refused message.

At this point I need to have this access so that I can set up our web developer with a direct connection to update our web files.  Can anyone help with this?

Thanks,
Nick

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: SFTP or FTP Access
« Reply #1 on: May 23, 2012, 12:49:53 AM »
genisys

Pls read the Howto FTP access to bays, link at top of forums
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Online Stefano

  • *
  • 10,894
  • +3/-0
Re: SFTP or FTP Access
« Reply #2 on: May 23, 2012, 11:55:36 AM »
I am trying to set up our SME server v7.2 to allow either SFTP or FTP access.

before it, please upgrade to 7.5.1 and start thinking about migration to 8.

7.2 is OLD, and should not be exposed to wan

Offline genisys

  • *
  • 46
  • +0/-0
Re: SFTP or FTP Access
« Reply #3 on: May 24, 2012, 10:44:30 PM »
I very much want to upgrade and am looking into that already, however, slightly worried I will lose all of the companies emails, DNS and website information. I do have a good backup using the "backup to desktop" option. I plan to fix yum with the instructions on the site (disable base repo and update).

Offline jameswilson

  • *
  • 794
  • +0/-0
    • Security Warehouse, trade security equipment
Re: SFTP or FTP Access
« Reply #4 on: May 26, 2012, 03:42:07 PM »
Done various updates over the years never lost any data yet. But do backup well first

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: SFTP or FTP Access
« Reply #5 on: May 27, 2012, 12:52:59 AM »
I very much want to upgrade and am looking into that already, however, slightly worried I will lose all of the companies emails, DNS and website information. I do have a good backup using the "backup to desktop" option. I plan to fix yum with the instructions on the site (disable base repo and update).

You may wish to consider another way to migrate from where you are (7.2) to version 8. Do a backup from the console to USB drive.  Remove drive(s) from your server store them safely and install new drive, nowadays, they are cheap... Install SME8 from CD, and when offered to restore, do so using your backup.  When all is done, you will need to reinstall your contribs - just reininstall what is absolutely necessary. This may take a little more efforts, it however has some advantages: (i) you will have a brand new system (ii) you still have your data and can reinstall your old drive should anything go wrong.  Belt and braces.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline genisys

  • *
  • 46
  • +0/-0
Re: SFTP or FTP Access
« Reply #6 on: June 21, 2012, 09:51:11 PM »
It's been awhile since my last posting, I got sidetracked with other issues.  :???:  I think that there is some confusion maybe with what I am trying to do.

I need to be able to FTP from our main UNIX server at the command line to the SME Server.

If I can do this, I can run a script on our main server to auto-update documentation files on our website.  Can this be done?  I shouldn't have to create a new ibay and user/group because I want to FTP in as root.

Thanks,
Nick

Offline genisys

  • *
  • 46
  • +0/-0
Re: SFTP or FTP Access
« Reply #7 on: June 21, 2012, 10:01:20 PM »
SSH would be fine as well, but I cannot SFTP to the server either. I am getting "Connection Refused". This is in "server only" mode, so the firewall wouldn't be on, I don't think........

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: SFTP or FTP Access
« Reply #8 on: June 22, 2012, 02:02:14 AM »
Post by Mary deleted by accident, my apologies.

genisys

Firstly please upgrade your server to at least v7.6 using yum commands refer FAQ & wiki & sticky forum thread at top of 7.x sme forum, links at top of forum. V7.2 is very old & I'm sure there have been security fixes released since then.
Your data should remain safe, but it is recommended to backup first.

Secondly ssh access to your server should be possible using a client like Putty.exe (for Windows or whatever, I even have pterm on my iPhone).
You can also use ssh at the command line from one sme server to another, so I assume it will be OK from other Unix/Linux servers as long as ssh is supported. There are plenty of online references re correct command syntax, so search.
You will need to enable ssh access in server manager, either password or public private keys. PP keys is recommended for security. You will need to create the keys and install on the server or workstation you are accessing from. Search these forums & wiki for reference to a nice howto that describes the whole process. If using password ssh access (not recommended personally), then preferably change port to 2222 or something else to partially deter test connections by hackers.

Thirdly ftp (sftp is recommended) is also possible but must be done the "sme way".
You will initially need to enable ftp access in server manager.
If you want write access then you need to use a client eg WinSCP or similar, that allows you to issue commands, particularly the cd /foldername command. The security model of sme requires this, please read the Manual carefully as it is very explicit about ftp & sftp. Also read the fine Howto in the wiki, refer links at top of forum.
Browser ftp access will only allow you to have read access IIRC.

Fourthly you mention being in "server only" mode, so I assume you are behind another firewall or sme server in gateway mode. You will need to forward appropriate ports to your sme server for the services you require access for eg port 22  or 2222 & so on.

Fifthly and personally, based on your last post, ssh'ing from server to server is the simplest way to go, and the most secure.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: SFTP or FTP Access
« Reply #9 on: June 22, 2012, 06:53:09 AM »
I shouldn't have to create a new ibay and user/group because I want to FTP in as root.

That would be a very bad idea, and can't be done with SME server software.

Offline genisys

  • *
  • 46
  • +0/-0
Re: SFTP or FTP Access
« Reply #10 on: June 22, 2012, 08:46:24 PM »
I will be doing the update as soon as possible. It seems that our server-manager is broken because even after I've ok'd SSH, I still can't get in. I installed v8 on a machine at home and after adjusting the settings in server-manager to allow SSH, I was able to SSH in and SFTP. Very sure the update will fix everything.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: SFTP or FTP Access
« Reply #11 on: June 23, 2012, 06:20:02 PM »
I will be doing the update as soon as possible. It seems that our server-manager is broken because even after I've ok'd SSH, I still can't get in.

Please report all problems experienced following updates via the bug tracker.

Offline genisys

  • *
  • 46
  • +0/-0
Re: SFTP or FTP Access
« Reply #12 on: July 18, 2012, 03:26:47 AM »
Just wanted to report back that I have updated/upgraded the server to SME 8.0. I attempted the "upgrade existing" option first and it wouldn't boot. So then I just wiped it and did a fresh install, which I wanted anyway. I was a bit freaked out when it booted to "GRUB _" (where the line represents a flashing curser). I removed the USB Flash drive with backup on it, put the install disc back in, ran the rescue, then rebooted...........it came all the way back up and I was able to restore from flash drive. Everything is working perfectly now. Thanks to everyone for the help  :grin:

Offline johnp

  • *****
  • 312
  • +0/-0
Re: SFTP or FTP Access
« Reply #13 on: July 18, 2012, 04:51:20 AM »
It's a bad idea to have a usb disk connected while installing IMHO.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: SFTP or FTP Access
« Reply #14 on: July 18, 2012, 04:52:35 AM »
It's a bad idea to have a usb disk connected while installing IMHO.

It is a very bad idea, and not just IYHO. :-)