Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

A4orce84

macrumors 6502
Original poster
Apr 17, 2012
409
44
Hey Guys,

As the subject states, is there a way to start an sFTP service on MacOS? I already have SSH and a SMB enabled, but looking for sFTP as well.

TIA.
 

frou

macrumors 65816
Mar 14, 2009
1,392
2,002
SFTP functionality is part of SSH. It's FTPS that's something separate.

In general, FTP(S) is considered mostly obsolete AFAIK.
 
  • Like
Reactions: Fuchal

A4orce84

macrumors 6502
Original poster
Apr 17, 2012
409
44
When I try to connect to my server from another laptop (Linux), it connects, but does NOT show me any directory listings on the server (Remote machine running MacOS).
 
Last edited:

A4orce84

macrumors 6502
Original poster
Apr 17, 2012
409
44
Anyone have some quick ideas on what to try to get things working? TIA.
 

Stephen.R

Suspended
Nov 2, 2018
4,356
4,747
Thailand
What are you using to connect from the Linux machine?

What happens if you just ssh to the Mac from the Linux machine?
 

A4orce84

macrumors 6502
Original poster
Apr 17, 2012
409
44
SSH works fine, with no issues. I'm using Filezilla on my Linux machine.
 

Stephen.R

Suspended
Nov 2, 2018
4,356
4,747
Thailand
What is the initial path FileZilla is set to use?

When you connect via SSH, can you change directories and see the directories you want to access?
 

A4orce84

macrumors 6502
Original poster
Apr 17, 2012
409
44
If you look at the last line in the output on the top, it DOES say connected for the last status message.
 

chrfr

macrumors G5
Jul 11, 2009
13,707
7,277
If you look at the last line in the output on the top, it DOES say connected for the last status message.
It doesn't look to be connected. Can you scroll down in the status panel at the top?
You don't need to do any special configuration to use sftp on a mac if ssh is enabled- by default sftp will just work as long as your credentials are valid.
 

A4orce84

macrumors 6502
Original poster
Apr 17, 2012
409
44
Restarted the app, and tried re-connected according to the status panel:

Screenshot 2020-03-26 14.54.35.png


It looks like it disconnects after about 20 seconds? Unsure what's going on...it appears to connect initially. Thoughts?
 

Attachments

  • Screenshot 2020-03-26 14.51.37.png
    Screenshot 2020-03-26 14.51.37.png
    287 KB · Views: 226
Last edited:

vitalz

macrumors newbie
Aug 14, 2020
20
5
Myensk, Belarus
If you highly need sFTP did you try to run any Docker service for that?
I googled one for instance. Not sure if that is what you need but it looks like that.
 

Stephen.R

Suspended
Nov 2, 2018
4,356
4,747
Thailand
If you highly need sFTP did you try to run any Docker service for that?
This is a joke right?

I am having the same problem. Anyone resolve this?

Exactly the same scenario, or some variation? What sftp client are you using (from which OS)? What error/messages do you see?


OP: if you happen to read this, did you get prompted about accepting the Mac's SSH fingerprint when you first connected via FileZilla?
 

vitalz

macrumors newbie
Aug 14, 2020
20
5
Myensk, Belarus
This is a joke right?
No, it is not. It is not a joke.

If this talk is about sFTP server running on a Mac so Dockerization could provide it easily: Docker container with mounted volumes. Just I see there a lot of user complains sFTP (server?!) is very hard to install on Mac now: so, Docker might be an option then.

The other questions are if available preferences will meed your needs. But in general isolated service (Docker virtualised container) is better (for your private use) than your Mac running sFTP (one more possible hole in security).

Or there is also something else what I don't follow for sFTP. But in your case when nothing works I would try Docker.

P.S. I'm running Nginx Docker image for a small project online and it deals quite good.
 

Stephen.R

Suspended
Nov 2, 2018
4,356
4,747
Thailand
Just I see there a lot of user complains sFTP (server?!) is very hard to install on Mac now

I don't know where you see "lots" of user complaints saying its hard to install an sFTP server on macOS, but it's like saying it's hard to install an electric motor in a Tesla. It doesn't matter how hard it might be in theory to install a different one, you don't need to do it, because it has one that works perfectly fine already.

so, Docker might be an option then.
There is zero configuration required to enable the built in sFTP server - just enable "Remote Login" in the Sharing pane of system preferences.

Running Docker is not a realistic solution to the problem as presented. It's the equivalent of telling someone who's locked themselves out of their house "here's the number for a good builder, just build a new house".

But in general isolated service (Docker virtualised container) is better (for your private use) than your Mac running sFTP (one more possible hole in security).
This makes zero sense. The built in SSH server (which provides sftp) authenticates connections against the macOS user database.

A Docker container to provide SFTP, with access to the Mac's files is running as "you" and gets access to those files, but then re-shares those files using whatever credentials might be setup in the Docker container. I'd bet money the default credentials are something ridiculously insecure.

Or there is also something else what I don't follow for sFTP.
Yes there's clearly something else wrong for those who said they have a problem, and thus far there's zero evidence that the problem is anything other than their SFTP client software.

P.S. I'm running Nginx Docker image for a small project online and it deals quite good.
What's that got to do with the price of fish?

What the OP wants is literally achieved by ticking one box in System Preferences > Sharing.
 
  • Like
Reactions: chrfr

vitalz

macrumors newbie
Aug 14, 2020
20
5
Myensk, Belarus
There is zero configuration required to enable the built in sFTP server - just enable "Remote Login" in the Sharing pane of system preferences.
If that was simple to users that subject might not exist. But some users complained it didn't run smooth for them.

Docker container to provide SFTP, with access to the Mac's files is running as "you" and gets access to those files
It grants access only to those files (mounted volumes). The other host's files are never accessible.


built in SSH server (which provides sftp) authenticates connections against the macOS user database
There is not a problem to mount host authorised ssh keys file to Docker container.
 

Stephen.R

Suspended
Nov 2, 2018
4,356
4,747
Thailand
If that was simple to users that subject might not exist. But some users complained it didn't run smooth for them.
The OP or others having a problem with an SFTP client is not necessarily indicative of any problem with the built in SFTP server. It's exactly the same SFTP server that would be running in any Docker image: OpenSSH.

It grants access only to those files (mounted volumes).
You missed the point I was making: the built in SFTP server uses the underlying filesystem permissions, so by default only your account has access to your home folder, for example, but it also allows access to anything you have access to.

Running a Docker instance to provide that means that anything you give access to (because you want to access it) is also available to any arbitrary user accounts that may be defined in the Docker image.

There is not a problem to mount host authorised ssh keys file to Docker container.
That's a pretty ****ing exclusive Venn diagram you've got there, of people who know how use public/private key pairs, know how to use them within a Docker image, but also think using Docker instead of just working out why their SFTP client won't connect to the built in SFTP server is a good idea.

It's kind of like the Venn diagram of Vegan Butchers who think McDonalds is a high quality restaurant.
 

Stephen.R

Suspended
Nov 2, 2018
4,356
4,747
Thailand
Ok so @A4orce84 @brock-2021 I just ran a quick test in a Debian VM. I installed FileZilla, plugged in my host OS IP, username and password, and sure enough it failed to connect, failed to show me any prompt about accepting the server's fingerprint etc.

I stuck a port number, and it connected and showed me the prompt for the fingerprint. Alternatively I tried it with sftp://<ip> and no port (as @A4orce84's screenshot shows) and that too worked.

If you can define some more attributes about your setup (specific Linux distro & version you're using, FileZilla version, macOS version) we can no doubt find out why it doesn't connect properly.


Upon closer inspection: @A4orce84 appears to be running FileZilla on a Mac: It's showing very macOS-specific paths in the local pane.
 

brock-2021

macrumors newbie
Feb 1, 2021
3
0
My question has nothing to do with running an sFTP server locally (like in Docker). I am simply trying to connect to an sFTP server (1and1.com). It is funny though I can connect to another sFTP server and also do ssh to the other server. So it has something to do with 1and1 and Catalina and ssh (because I can't ssh into 1and1 either)
 

chrfr

macrumors G5
Jul 11, 2009
13,707
7,277
My question has nothing to do with running an sFTP server locally (like in Docker). I am simply trying to connect to an sFTP server (1and1.com). It is funny though I can connect to another sFTP server and also do ssh to the other server. So it has something to do with 1and1 and Catalina and ssh (because I can't ssh into 1and1 either)
Are you also using Filezilla? I've had no issues connecting to sftp servers either on a Mac or elsewhere using Cyberduck.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.