LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-12-2009, 03:22 PM   #1
PoopLoops
LQ Newbie
 
Registered: Feb 2009
Location: Washington State
Distribution: Ubuntu
Posts: 18

Rep: Reputation: 0
Lazy Man's scp?


I do a lot of up/downloading to/from my school's computer network from my laptop and desktop so that I can work on my stuff anywhere and so that I have a secure (as in it won't crap out on me) place to store large files (emailing myself the files is tedious).

But scp is kind of annoying to use because I have a lot of folders and subdirectories that I use, mainly for having different versions of code that I write, so lots of similar names and junk. What I usually do is ssh, find the file(s) I want to download, and then exit, and scp to that directory, where the terminal still displays my ssh session so I know where to go. Yeah, that works, but is there an easier way to just be logged in remotely and copy things over to the computer I'm on at the time? The caveat is that it can be *any* computer with ssh, so I won't always know my IP, and also, I don't like having to remember so many addresses/IP's. :P

Or at least, is there a way I could write a script that would do this for me? It would make it easier on my PC and laptop, at least.

Thanks.
 
Old 04-12-2009, 03:45 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
note really clear on what you want to achieve, but sftp will give you an ftp login environment not a single shot command.
 
Old 04-12-2009, 03:56 PM   #3
PoopLoops
LQ Newbie
 
Registered: Feb 2009
Location: Washington State
Distribution: Ubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
Let me explain what I do now:

ssh blah@schoolPC
*look around for the file I want*
exit
scp blah@schoolPC:-/filepath/ ~/destinationpath/
-----------

What I would like:

ssch blah@schoolPC
*look around for the file I want*
COPY this file to ~/destinatoinpath/ on my current PC
----------------

The reason this is a big deal for me is because scp doesn't have auto-complete for the remote computer, because I don't log in until I input the command. So with a long file path, it's annoying to have to type all this out, and also there is a decent chance of a typo somewhere.
 
Old 04-12-2009, 04:14 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
as above, sftp.
 
Old 04-12-2009, 04:52 PM   #5
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware -current, 14.2
Posts: 1,085

Rep: Reputation: 195Reputation: 195
There's sshfs, a cousin to sftp, using fuse.

These two links should elaborate and help you set it up - it's a snap.

http://fuse.sourceforge.net/sshfs.html
http://www.linuxjournal.com/article/8904

cheers,
 
Old 04-12-2009, 04:53 PM   #6
PoopLoops
LQ Newbie
 
Registered: Feb 2009
Location: Washington State
Distribution: Ubuntu
Posts: 18

Original Poster
Rep: Reputation: 0
Cool, thanks.
 
Old 04-12-2009, 05:30 PM   #7
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
The most obvious solution, in my humble opinion, is to use rsync over ssh to keep your working copies up to date. Using a version control system like subversion or cvs would also be a possible solution but probably over the top.

Using rsync is really effective since it will only transfer changed files, making it possible to keep up to date copies of your stuff (be it code, configuration files or documents) on different computers with no hazzle. If you run it over ssh (it's as simple as adding -e ssh) you will have secure transfers too. No hazzle, no problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
one man's "handy" is another man's "clunky" stabu Linux - Distributions 1 03-19-2009 06:51 PM
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-29-2008 12:41 AM
Wanna do a poor man's slacktop... papa0822 Linux - Laptop and Netbook 2 10-12-2004 07:59 PM
One man's bogmarsh is another man's raceway. canon LinuxQuestions.org Member Success Stories 1 10-29-2003 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration