4 replies
Sign in or join Beachball Help to reply.
- 0
Austin Kinsella1 ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I actually used that command for the first time a few minutes ago, to send a file to a colleague - he told me what to type:
scp path-to-file user@machine:directory/It asked Are you sure you want to continue connecting?, then asked for the password.
- 0
Rick Van Vliet ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Applications>Utilities>Terminal.app
(ugly black screen, blocky cursor waiting for your command...this is Terminal mode. The line that ends with yourname and a $, is called the prompt)A good place to pause and reflect, might be to open Help, once you open Terminal, before you start using it.
At at the prompt, type your command, follwed by the Enter, or Return key
You need to know:
your username
your password
and the "path/to/the/file" (like /Users/dan/documents/fakefile.doc)This app can be the geekiest, and the most useful tool that OSX provides, though some may argue with me on "most helpful".
Good Luck
- 0
Camelot ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
'pscp' is actually a Windows client for implementing scp (because Windows doesn't ship with SSH installed by default).
The command and arguments you've been told to use will not work on anything other than a Windows machine with pscp installed.
That's not to say you can't use scp - you can, you just can't use the command in the way they're telling you to.
In general scp requires two things - a source and a destination. Either source or destination can be on a local or a remote system. If 'source' is remote and 'destination' is local, then you're download something from the server to your machine, and if 'source' is local and 'destination' is remote you're uploading to the server.
The basic format is:
scp source destination
where either source or destination is a local or a remote path.
If local this is simply the path to the file on your system. If you're already in the directory you can just type the filename, otherwise you'll need to include the path to the file.
If remote then the format is hostname:/path/to/file where 'hostname' is the DNS hostname or IP address of the server. If you need to log into the server using a different username you can use the form username@hostname:/path/to/fileSo, assuming you want to upload the file /path/to/file to the /var/tmp/ directory on server 'homer', you would use:
scp /path/to/file homer:/var/tmp/
You'll be prompted for your password on homer, then the file will be uploaded.
To download a file simply reverse the parameters:
scp homer:/var/tmp/file ~/
This will download the file /var/tmp/file from homer and save it in your home directory.
Now, the big gotcha here is the additional switches you've been told to use with pscp. The '-P 8080' tells me they're running on a non-standard port number (8080) rather than the normal port 22. If that's the case you may need to tell scp to use a non-standard port, too which coincidentally uses the -P switch.
The rest of the pscp switches are mostly irrelevant. -v adds verbose messages (so you can see the progress). -2 uses SSH v2 which is the default under Mac OS X. We covered -P 8080, and there's no way we'll add the password on the command line (bad, bad, bad idea).So, the equivalent scp command to what you've been told to do with pscp is:
scp -P 8080 FILE username@address
If you substitute the appropriate parameters you should be all set.
- 0
Rick Van Vliet ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Aaah. Very cool -- thanks a lot Camelot 😉
That's neat. This will help the OP tons, and someting I never knew. I see the diff, now.
rick