Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to transfer files between a server and my mac using the terminal and SSH. If I haven't already logged into the server I can simply type:
scp -r ~/Desktop

However, if I've already logged into the server via SSH, this isn't going to work as the home directory is on the host machine not my client machine I'm working from.

Is there a good way I can change directory to my client mac, simply refer to it to transfer files?

share|improve this question
up vote 1 down vote accepted

No. Your SSH session on the remote computer is equivalent to a local terminal logon so you'll have to use scp again to copy the files (i.e. scp from remote computer to your local one).

You might as well open a new terminal window and use the same command. If you want to avoid typing the password, you can use private key authentication or reuse an SSH connection.

share|improve this answer
That's too bad. Thanks! – Clark1Bravo Sep 22 '12 at 0:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .