Help with SSH Commands


#1

Hey guys,
Can someone please tell me how to download/upload via ssh.

i tried using the scp command but cant seem to get it working :frowning:

this is what i found from searching the net:

scp me@remote_machine:program.f .
(Copies the remote file program.f, making a local copy of the same name.)
scp me@remote_machine:files/prog.c local.c
(Copies the remote file prog.c, making a local copy called local.c)

or you can copy a local file to the remote machine:
scp program.f me@remote_machine:
(Copies the local file program.f to the remote machine.)
scp prog.c me@remote_machine:files/
(Copies the local file prog.c, making a remote copy in the
files subdirectory of the same name)
scp prog.c me@remote_machine:files/remote.c
(Copies the local file prog.c, making a remote copy called
files/remote.c)

i tried copying a file from the webhost server to my computer but failed

also…where would the file be if i download it to my computer ?

someone please explain!!

thank you much!

minh n.


#2

Does your computer have sshd running?
You can only scp to a machine which has sshd running. You could scp from a webhost server to your machine if you have an scp client on your machine (either the command line one or a gui one).

Also, the syntax would be reversed if you’re copying a file on the remote machine to your local machine - it would be:
scp somefile remote_machine:

Using the “.” would scp it to the current directory (whatever directory you’re in when you run the command). If no directory is specified (as in my example), the user’s home directory would be used.

What operating system are you running on the client machine?


#3

im using winxp, connected to nexus via hyper terminal that came with windows

now, when i connect to, lets say, mydomain.com, and my user name is myusername, so the path is /home/myusername/mydomain.com/

and i want to download a file at www.mydomain.com/picture.jpg

what would i need to type after the scp command to download the picture.jpg file to my computer ? how would i upload a file ?


#4

also i saw your profile,

what kind of genre do you spin ?

do you just dj as a hobby or for extra cash as well ?


#5

Your best bet would be to either use winscp, or to use an FTP client. You need to be going the other direction, since your machine is (presumably) not running an ssh server.


#6

so i cant download/upload files to the server using an ssh client ? i thought ssh was the prefered way of transfering files … hmm i dunno, im confused


#7

The program I’ve been using for file transfer is SSH Secure Shell from ssh.com.

That’s the only free SSH graphical file transfer program I know of. (speaking of Windows here, which may not be what you’re looking for.)


#8

I believe you could use SFTP instead but I am not sure if this would be suitable for transfer in ASCII mode.

Check out Chapter 5: Using PSCP to transfer files securely at
http://the.earth.li/~sgtatham/putty/0.55/puttydoc.txt


#9

Filezilla - http://filezilla.sourceforge.net/ - will do both FTP & SFTP.

I’ve gone back to regular FTP, though, because SFTP was godawful slow.