hello,

I want to ask linux guys - what is the benefit of using scp command in putty instead of using winscp and drag and drop copying?

I tried to copy, and it does not work for me with scp command, so I have to waste my time figuring out how to copy.

While is was so simple drag and drop with winscp. I don't understand how people can like command line. I would use command line only if there is no other tool.

what I was trying is

scp e:/projektai/test.txt darius@dev.3etnow.com /home/darius




ssh: Could not resolve hostname e: Name or service not known
cp: cannot stat `darius@dev.3etnow.com': No such file or directory

I was doing by example:
scp /path/to/local/file username@hostname:/path/to/copy/to/

How can it now know what e is. How else I can tell him where my file is... What a bad software. I have probably to read some mannual to just COPY THE FILE!!! wow

Recommended Answers

All 7 Replies

ok, winscp is not as cool to copy files which require sudo, or I don't know how. So then left is command line.

Still don't understand why they don't manke that feature.

So lets say I want to copy file from logs.

I found how to do in other way becaue I cannot do it with putty.

http://www.it.cornell.edu/services/managed_servers/howto/file_transfer/fileputty.cfm#puttytrans

C:\Users\Darius>pscp darius@dev.3etnow.com/var/logs/apache2 e:/
Local to local copy not supported

why local to local? I am usirng remote address, so why it complains that its local to local?

still found a stupid way to copy file :D

sudo cat access.log > /home/darius/failai/access.log

then new created file is without restictions and I can copy it with winscp by drag/drop :D

so far the easiest way :)

Many advantages to the CLI - especially it is easy to script and automate.
What is e:? Are you referring to another computer or your E drive in your windows box? If another computer, what happens when you ping e? Does it resolve to an address?
When scp sees a ':' it believes the part before the ':' is the hostname of another computer.
Here is the command I think you are trying to use
change to the directory in which file is located (not sure how to do that in putty on windows anymore)
scp test.txt darius@dev.3etnow.com:/home/darius
Note that the @ separates the username from the hostname. Then the : separates the hostname from the directory structure you want to traverse to place the file.

What is e:? Are you referring to another computer or your E drive in your windows box?

its drive in my local windows computer

thanks, I will check later your examples

Many advantages to the CLI - especially it is easy to script and automate.

this is good, but when I don't need automation, and need quick doing task, then it really lacks of usability.

To each his own. I normally use WinSCP when copying from Windows because I do it so infrequently, but almost always use scp or rsync on *nix.

scp from linux command line will copy to an ssh enabled server. If you are tring to copy with SCP from linux to windows, you will probably fail. if you are tring to copy with scp from windows to linux you will surely fail, unless you have cygwin or something similar installed (Dunno if win include an scp utility in their latest versions).

For you the best choice would be winscp.

If you want to do it over linux, it will be a bit more tricky.

Yes, sometimes you need to read some manuals to something you don't know about. Or ask someone. If you don't care to learn about it, just do it the easy way. If you care to learn something, you will have to do some reading/research. Depends on your needs.

thanks. Since I do it rarely - I wil do this in dirty way - just copy file with good permissions to read without sudo and then use winscp :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.