Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > how to use scp

how to use scp
Thread Tools
MacPC
Forum Regular
Join Date: Aug 2006
Status: Offline
Reply With Quote
Dec 3, 2006, 10:17 AM
 
Hi,

I am trying to learn to use the scp command. My setup is like this, A Mac mini and a Windows2000 PC. I have setup the Mac as the SSH host and the PC as the client using PuTTY. I can SSH to the Mac without a glich, but since the two systems are on the same LAN, so they have the same domain name-macmini.DynDNS.com

In PuTTY, I typed in:
scp *.rtf [email protected]:testFile.rtf

I get this message:
scp: testFile.rtf: No such file or directory.

What have I done wrong here? Do I need to have a different domain name for my PC as well?

Thanks in advance.

MacPC
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Dec 3, 2006, 11:42 AM
 
You can't copy a selection of files (*.rtf) to a single file (testFile.rtf).

Either copy them one at a time or copy them all to an existing folder.
     
MacPC  (op)
Forum Regular
Join Date: Aug 2006
Status: Offline
Reply With Quote
Dec 3, 2006, 12:37 PM
 
DAH! But of course, what was I thinking.

I tired this:
scp test.rtf [email protected]:myTestFile.rtf

It does make a copy but it goes to the Document folder on my Mac, not to my PC. How do it get it to copy to my PC? Looks like I need another domain name for my PC, am I right?

MacPC
     
enola
Dedicated MacNNer
Join Date: Sep 2001
Location: California
Status: Offline
Reply With Quote
Dec 4, 2006, 02:15 PM
 
Use the IP address of the PC?
     
kick52
Baninated
Join Date: May 2005
Location: England
Status: Offline
Reply With Quote
Dec 14, 2006, 03:58 AM
 
Originally Posted by MacPC View Post
DAH! But of course, what was I thinking.

I tired this:
scp test.rtf [email protected]:myTestFile.rtf

It does make a copy but it goes to the Document folder on my Mac, not to my PC. How do it get it to copy to my PC? Looks like I need another domain name for my PC, am I right?

MacPC
i'm guessing you have the PC and Mac Mini set up on LAN?

you could set up a proxy on your router/computer directly connected to the net, with a port number of 6789 or something. Then, bind the hostname to something.dyndns.com:6789

I think that will work.



Wait. If they are on the LAN, just find out the LAN IP of the PC and Mac Mini, (should be something like 10.0.2.1) and go "ssh [email protected]"
     
[APi]TheMan
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Dec 23, 2006, 07:52 PM
 
Hey there, looks like you're a little turned around... When you use Putty to SSH to your Mac, it is as if you are sitting on your Mac typing on your Mac. So when you scp a file to macmini.dyndns.org it is going... to your Mac.

What you should do is use WinSCP from your PC to connect to your Macintosh. WinSCP is much like an FTP client and will allow you to connect to your Mac and see a list of files, which you can then download to your PC.

The SSH server running on your Mac is very neat because it allows you to access it via SSH (Putty), SCP (WinSCP), and SFTP (WinSCP). The server running behind the scenes is the OpenSSH daemon that Apple has included in Mac OS X, and it allows you to do all this without any extra configuration! Your PC is not running any kind of SSH server, so you cannot connect directly to it to copy files.
"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 02:01 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,