There was a question in the quickies about accessing files in a Public folder from another SSH capable computer. In this piece, I'll try to answer that question and hopefully help folks understand SSH a little better.
Read the rest of this article for a great overview on what SSH actually is, and how to use it for remote connectivity in OS X.
SSH is really a collection of different pieces. There is a server, sshd, that allows secure connections into your machine, as well as a number of clients for making secure connections to other machines. The ssh client allows you to open a secure shell on a remote machine. We will use scp, which stands for secure copy, to access the Public folder. This article assumes that SSH is already running on your machine. For help getting SSH running on your machine, there is a nice piece at stepwise.
Here is the original question.
Let's assume the owner of the Public folder is the user jose, that the Public folder is in it's default location, and you want a file named file.txt. For purposes of the example, we will assume that you are accessing the Public folder from a Unix machine with SSH installed as well.
To connect to your OS X box from the remote UNIX machine, you simply invoke the SSH client at the command line:
The syntax for scp is pretty simple. scp takes two parameters, where you are copying from and where you are copying to. In UNIX, your current directory is "." (the period, called dot). If you want to copy file.txt to your current location, you would type:
As with all Unix commands, see the man (manual) pages for more information.
Mike
Read the rest of this article for a great overview on what SSH actually is, and how to use it for remote connectivity in OS X.
SSH is really a collection of different pieces. There is a server, sshd, that allows secure connections into your machine, as well as a number of clients for making secure connections to other machines. The ssh client allows you to open a secure shell on a remote machine. We will use scp, which stands for secure copy, to access the Public folder. This article assumes that SSH is already running on your machine. For help getting SSH running on your machine, there is a nice piece at stepwise.
Here is the original question.
I want to be able to get documents from my public folder from any SSH capable computer. How do I go about setting this up? I already have SSH installed, and have enabled remote access and turned on file sharing. Also, I know my SSH port will work. Now what? Do I need to create a guest user in the 'User' pref panel? Keep in mind, all I want is to be able to access my public folder remotely. - anonymousFirst off,do not enable remote access or file sharing in the System Prefs. Turning on remote access turns on telnet access to your box. Telnet is not secure. Turning on file sharing turns on ftp access to your box. FTP is not secure. We will only need SSH. Also, there is no need to create a new user. You will login with the same account that owns the public folder.
Let's assume the owner of the Public folder is the user jose, that the Public folder is in it's default location, and you want a file named file.txt. For purposes of the example, we will assume that you are accessing the Public folder from a Unix machine with SSH installed as well.
To connect to your OS X box from the remote UNIX machine, you simply invoke the SSH client at the command line:
ssh -l jose -pUNIX will come up and ask you for a password, and then you'll be connected to your home box via the command line. You can copy, move, delete, rename, etc. anything that you could normally do as yourself at home. However, those changes all take place on your OS X box, so there's no obvious way to copy a file to your local machine. That's where scp comes into play. NOTE: If you are trying to access the Public folder from a Mac or Windows machine, most good ssh clients have scp included as well. See the documentation for how to use your specific client.
The syntax for scp is pretty simple. scp takes two parameters, where you are copying from and where you are copying to. In UNIX, your current directory is "." (the period, called dot). If you want to copy file.txt to your current location, you would type:
scp jose@your.machine.name:Users/Jose/Public/file.txt .You should be prompted for the password for jose. After typing in the password, the secure transfer of file.txt should begin.
As with all Unix commands, see the man (manual) pages for more information.
man scp [and] man sshHope this helps,
Mike
•
[45,717 views]

