Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ Running the server ➜ scp in Shell

scp in Shell

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Ithildin   USA  (262 posts)  Bio
Date Tue 08 Feb 2005 03:25 AM (UTC)
Message
I searched the forums and didn't find anything. How do I scp from a server? I got this from putty, but it's gibberish to me.


usage: 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


So I was wondering if someone knew how to use it and could give me a dummies guide to using it.

Thanks
Top

Posted by Dave   Australia  (93 posts)  Bio
Date Reply #1 on Wed 09 Feb 2005 11:24 AM (UTC)
Message
In a nutshell:

scp <from> <to>

where from and to can be either local or remote files.

For instance:

scp act_comm.c dave@mymud.com:/path/to/mud/src

would copy your local file act_comm.c to the user dave on mymud.com's account in the /path/to/mud/src directory.

or, to transfer the other way:

scp dave@mymud.com:/path/to/mud/src/act_comm.c .

(where . denotes the local directory)

Hope this helps,

Dave
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #2 on Wed 09 Feb 2005 09:35 PM (UTC)
Message
Ok, I've tried C:\ and C: and C:/ and it doesn't seem to work. It gives me this:


ssh: C: Name or service not known
lost connection


Is there something else I have to do?
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #3 on Wed 09 Feb 2005 09:49 PM (UTC)
Message
Ok, I've figured out how to download it to local directory, but I can't find the file on my comp. Did a search for it and couldn't find it. I'm doing this.


 scp name@website.com:file .file
name@website.com's password:
File                                                                            100%   151KB     150.9KB/s   00:00


Ok, so now what? heh.

Thanks a bunch


Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #4 on Wed 09 Feb 2005 09:57 PM (UTC)
Message
scp name@website.com:file .file
That will store the file into file ".file" in the working directory - probably not what you wanted to do!

The '.' in the original command meant 'current directory', much like how '..' means 'previous directory'.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #5 on Wed 09 Feb 2005 10:03 PM (UTC)
Message
So how would I download it to my comp? outside of server?
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #6 on Wed 09 Feb 2005 11:47 PM (UTC)
Message
Well, how exactly are you running scp?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #7 on Thu 10 Feb 2005 (UTC)

Amended on Thu 10 Feb 2005 12:10 AM (UTC) by Zeno

Message
If you're trying to get a file from the shell/server onto your local computer, I believe you cannot do that without FTP or the like.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Ithildin   USA  (262 posts)  Bio
Date Reply #8 on Thu 10 Feb 2005 01:09 AM (UTC)
Message
ah ok. As of right now, we don't have ftp because of security issues. I was thinking scp was about the same. but yea, I was trying to ftp from the server using scp. was thinking they were about the same.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #9 on Thu 10 Feb 2005 01:12 AM (UTC)
Message
Well you could use SFTP, it's more secure, but then again I haven't looked much info on that. I just use it, and that's it.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #10 on Thu 10 Feb 2005 02:35 AM (UTC)
Message
SFTP is as secure as SSH, which means that it's really quite secure.

BTW, SCP is just another kind of file transfer client using SSH. I don't know why you say it wouldn't work. In fact, I just used it, using Cygwin on my local computer...

$ scp darkstone@darkstone.betterbox.net:mud/src/mud.h mud.h
The authenticity of host 'darkstone.betterbox.net (68.90.69.77)' can't be established.
RSA key fingerprint is d1:8e:26:19:4d:9c:2f:30:f0:3b:9b:e4:62:c9:92:e7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'darkstone.betterbox.net,68.90.69.77' (RSA) to the list of known hosts.
darkstone@darkstone.betterbox.net's password: xyz
mud.h                                                                                 100%  138KB 138.3KB/s   00:01


Worked just fine: it put mud.h into the directory I was working in.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


30,581 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.