DebianThis forum is for the discussion of Debian Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
so I was trying to copy a file from my class server through ssh from the terminal by typing 'cp file destination' but I cant get it to copy from there to my system at home. However, if I run the ssh gui program from xwindows, I can view the connection as a folder and I can browse with my mouse and copy the files. So I know I should be able to copy them with a simple command, right?
Under the hood that gui uses scp. Which in turn relies on ssh for security. A gui is just that: a graphical user interface. By definition it's not a program by itself, it's just a (pretty) shell surrounding the actual program that does the work for those that can't or won't want to work from the commandline...
No, ssh is only the secure connection. By itself ssh can't copy files. But if you insist, by all means: go ahead...
Last edited by Dutch Master; 11-15-2008 at 08:57 PM.
In fact there is even a MS Windows GUI utility for scp called, not surprisingly, WinSCP. It lets you drag and drop as well.
However you said you wanted to do command line (CLI) and as both I and DutchMaster have explained the CLI command to use that goes over the same port as ssh is scp and sftp. There is no law requiring you to use CLI but your question seemed to imply you wanted to learn how.
While you COULD actually create what is called an ssh tunnel and then do cp over that only God knows why you'd bother when scp/sftp are sitting there for that very purpose and all you have to do is launch the appropriate command.
Off on a tangent:
Back when I was learning UNIX and most communications were serial connections (usually over modem) there was a utility called "cu" that let you do the connection but also let you do ~put and ~get to transfer files using the same connection session. I've sometimes wished that ssh had a similar facility built in simply to avoid running a separate command when I wanted to quickly copy a file. Alas it is not so for ssh and on a multiuser/multiprocess OS like UNIX/Linux it really isn't that big a pain to launch a separate window for the command.