Boat Drinks  

Go Back   Boat Drinks > General > Computer and Consoles

Reply
 
Thread Tools Display Modes
Old 11-11-2008, 15:03   #1
Desmo
The Last Airbender
 
Desmo's Avatar
 
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
Default SCP command help

Had a look around the net but can't find an answer.

When using SCP to copy files from server to server or desktop to server I can get it working. But what if I'm on the server and just want to copy a file to the desktop. I can't seem to get the command right.
__________________
Desmo is offline   Reply With Quote
Old 11-11-2008, 15:08   #2
Daz
The Stig
 
Daz's Avatar
 
Join Date: Jun 2006
Location: Swad!
Posts: 10,713
Default

From the desktop, something like:
Code:
scp user@server:/path/to/file /home/user/desktop
__________________
apt-get moo
Daz is offline   Reply With Quote
Old 11-11-2008, 15:17   #3
Desmo
The Last Airbender
 
Desmo's Avatar
 
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
Default

I can do it fine from the desktop. But lets say I've SSH'd into my server, found the file I want and just want to copy it to the desktop.

I want to go "scp file.abc Desktop" somehow. I'm not sure it's possible is it?
__________________
Desmo is offline   Reply With Quote
Old 11-11-2008, 15:29   #4
Daz
The Stig
 
Daz's Avatar
 
Join Date: Jun 2006
Location: Swad!
Posts: 10,713
Default

You would need an ssh server running on the Desktop, reachable from the server. I dont know of any trick to just bring it back to an client connected as a tty. You'd need a client that somehow realised it was receiving binary data from stdout which then pumps that into another file, which would be messy to detect and handle I guess.

Not something I've ever had to use though so there might be a more obvious it can happen
__________________
apt-get moo
Daz is offline   Reply With Quote
Old 11-11-2008, 15:38   #5
Desmo
The Last Airbender
 
Desmo's Avatar
 
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
Default

It's not a problem and I'm probably trying to do something that's not meant to happen, just for ease.
I guess it was just so I didn't have to remember the full path to the file on the server. I could just navigate there and then SCP the file to the desktop. Nae bother
__________________
Desmo is offline   Reply With Quote
Old 11-11-2008, 21:04   #6
Mark
Screaming Orgasm
 
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
Default

sftp might be helpful for you here. It's a bit like ftp (so you get a prompt), but it's secure.
Mark is offline   Reply With Quote
Old 11-11-2008, 21:10   #7
Burble
Rocket Fuel
 
Burble's Avatar
 
Join Date: Jul 2006
Posts: 7,826
Default

Quote:
Originally Posted by Desmo View Post
I want to go "scp file.abc Desktop" somehow. I'm not sure it's possible is it?
Just so I'm understanding what you're trying to do, are you trying to copy a file from someone on a machine to somewhere else on the same machine or are you trying to copy from one machine to another?

I'm pretty sure you mean the latter but wanted to be sure.
Burble is offline   Reply With Quote
Old 11-11-2008, 21:29   #8
Mark
Screaming Orgasm
 
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
Default

I think the gist is this - start with a desktop machine, ssh into a server, and then copy a file back to the desktop machine.
Mark is offline   Reply With Quote
Old 11-11-2008, 21:38   #9
Desmo
The Last Airbender
 
Desmo's Avatar
 
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
Default

Want to copy from my webspace to my Desktop.

Mark has got it
__________________
Desmo is offline   Reply With Quote
Old 11-11-2008, 21:38   #10
Daz
The Stig
 
Daz's Avatar
 
Join Date: Jun 2006
Location: Swad!
Posts: 10,713
Default

Yeah, I think Des wants to pull it back in the client. Use putty to get into something, find a file you want, and just bring it back through the client somehow is how I read it
__________________
apt-get moo
Daz is offline   Reply With Quote
Reply


Posting 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
Forum Jump


All times are GMT +1. The time now is 03:26.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.