I think what you're trying to do is very unwise. Host the files on a publicly-accessible server, not on your personal workstation.
However, if you're determined to do it anyway, I can give you only general guidelines.
You'll need either a static IP address from your ISP or a dynamic domain name for your gateway. The server will need a fixed IP address on the LAN --- not a DHCP address. Forward TCP port 22 to the server.
Next, you'll need to add some directives to /etc/sshd_config. Uncomment the following line, if it's commented:
Subsystem sftp /usr/libexec/sftp-server
Then add something like this:
Match User user ChrootDirectory path AllowTCPForwarding no X11Forwarding no ForceCommand /usr/libexec/sftp-server
where user is the name of the account the clients will log in as, and path is the directory containing the files you want to distribute. See the sshd_config(5) man page for details. Make sure that read-only permissions for user are set for path and all its contents -- unless, of course, you want the clients to be able to make changes, in which case the permissions will need to be different.
There are other details you'll need to decide, such as password vs. public-key authentication, GSSAPI, etc.
Restart sshd and test.
Thanks for the reply. I should clarify that I am looking at doing this on a server running Lion server that is also hosting our website. I have the domain and IP address taken care of so that's not a concern.
That being said, how would you recommend I allow outside access to a specific folder? I want secure access with a password and do not want viability to any other folders. I would prefer if this could be accessed through a standard sftp client but I'm open to your ideas.
Why not use webdav?
Set up the share in Server.app and make the share accessible through webdav. Set the permissions here as well.
On the client workstation, connect to the server by clicking "Go" then select "Connect to server"
For the address you type:
If the folder is shared securely using ssl then use https://server.example.com/foldername
If you don't know what ssl is or if it's enabled, then you probably can just use the first example.
I wouldn't use ssh since having access to your computer with this method allows all kinds of commands etc. In fact, technically, if a user could successfully authenticate to your computer using ssh, they could execute ANY command that you can perform as a user that's logged in to your computer normally. For exmpale, your ssh'd person might as well be sitting in front of your computer.
Sure will. It runs on Port 80.
That means that if you already have a website that's available from outside your network, then no additional configuration will be needed. (in terms of port forwarding or address translation)
Not a stupid question! It's pretty easy if they're running Vista or newer. I think XP needs a download from MS to allow for ssl connections, but here's how with vista and 7.
Click your start menu.
Click the Map Network Drive button at the top of the window.
Select a drive letter of your choice.
In the address field type https://server.example.com/webdav/sharename (where sharename is the name of the folder that you're sharing)
Click the checkbox that says: "Connect using different credentials"
Click Finish and enter your credentials.
It should connect!