Click to See Complete Forum and Search --> : transferring files via ssh
shadebug
02-23-2005, 02:00 PM
I can't get samba working and, quite frankly, I don't want to because my compiuters too slow to handle fedora 3 at the moment.
I need to get some files onto my university web space from my computer. I can ssh onto my university space but how do I transfer files from my computer into that space? I'm guessing a normal mv won't quite do the trick
psych-major
02-23-2005, 02:09 PM
Try the instructions here (http://www.thelinuxbox420.com/ssh.html).
It sounds like this PC is command-line only? If not, gftp also has ftp via ssh capabilities.
ph34r
02-23-2005, 02:11 PM
scp localfile user@remotebox:/place/to/put/file
Or
scp user@remotebox:/path/to/file /local/place/to/put/file
hlrguy
02-23-2005, 02:13 PM
NAME
scp - secure copy (remote file copy program)
SYNOPSIS
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 [...] [[user@]host2:]file2
DESCRIPTION
scp copies files between hosts on a network. It uses ssh(1) for data
transfer, and uses the same authentication and provides the same security
as ssh(1).
That should do it.
hlrguy
or what phr beat me into saying. :D
shadebug
02-23-2005, 03:03 PM
There was an error initializing a SSH connection with the remote server. The error message from the remote server follows:
Request for subsystem 'sftp' failed on channel 0
Disconnecting from site central.aber.ac.uk
so much for gftp
right, I'm gonna try scp, I'm guessing it'll ask my password when it gets to that
shadebug
02-23-2005, 03:08 PM
write I typed
scp /home/shadebug/filename username:password@server/folder/filename
our survey says, ssh: username: Name or service not known
ain't that just a kick in the pants
shadebug
02-23-2005, 03:13 PM
also, I do have a gui and am using it but my computer's struggling to keep a single browser open and I can't get samba to do anything useful so ssh it has to be *unless you've got a better plan)
ph34r
02-23-2005, 03:13 PM
scp /home/shadebug/filename username@remotebox:/path/to/put/file
shadebug
02-23-2005, 03:41 PM
no such file or directory:mad:
oh how fun life is, remember the file's going from my computer to the server
ph34r
02-23-2005, 03:53 PM
Don't take this wrong, but I think there is a case of pebkac going on...
shadebug
02-23-2005, 04:02 PM
ok then, but what the hell do i do about it? Shoot myself?
Fudge it, I'll just e-mail it to myself and use the uni workstations. I hope you're happy, I'm gonna have to use a windows box.
hlrguy
02-23-2005, 06:47 PM
Nobody wants you to use a windows machine! :D
steve:/home/steve> scp /home/steve/cow.txt steve@14.22.6.19:/homes/steve
steve@14.22.6.19's password:
cow.txt 100% 1298 1.3KB/s 00:00
steve:/home/steve>
in your example, either the source file (path) or destination path was not correct.
hlrguy
P.S. IP changed to protect the innocent
shadebug
02-23-2005, 08:02 PM
of course, I was assuming it worked like mv so I was putting in the destination filename, which was unnecessary... dang, oh well, next time i suppose
shadebug
02-23-2005, 10:58 PM
on a side note, when I was on windows I actually started panicking to the person next to me that I couldn't find the command line. It was hidden under utilities, now, back in my day it was right there on the first menu
shadebug
02-24-2005, 07:01 AM
just did it with a different file, I was writing user@host:/directory/directory/
silly me wasn't thinking that when I log in as user it takes me to a subdirectory, so i take off the first / and suddenly all is right with the world.
hlrguy
02-24-2005, 12:09 PM
Cool, now you aren't forced to use Windows.
hlrguy
shadebug
02-24-2005, 07:55 PM
I´m actually using the same technique on my new mac too, now i can install gentoo on the laptop