LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-27-2003, 02:31 AM   #1
palanisaravanan
Member
 
Registered: Oct 2003
Location: India
Distribution: Debian
Posts: 95

Rep: Reputation: 15
Question difference between SSH and SCP


What is the difference between taking a backup(or copying a file over network) using SCP and SSH.If u can copy a file over network using SSH what is the need for SCP.Can any one explain
 
Old 12-27-2003, 04:38 AM   #2
anon237
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
One is a secure shell (SSH), the other a secure copy (SCP). To my knowledge you cannot copy (secure or not) with SSH.

See man ssh and man scp.
 
Old 12-27-2003, 12:07 PM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
scp (on Linux, any way) is part of the OpenSSH suite of tools. Basically it's an encrypted/strongly authenticated version of rcp (one of those nasty "r protocols").

ssh is a secure remote shell mechanism, so it doesn't have any kind of way to copy files between hosts. The whole job of ssh is to make you session act like a local shell on the remote box (like telnet).

We should be clear about what we are discussing, though. SSH (big letters) is the Secure SHell protocol. SSH.com has a commercial suite of products based on it (and I believe they also copyrighted "SSH"), and many other companies (such as Van Dyke) also make SSH tools. ssh (little letters) is the client program that implements SSH on most UNIX systems. In *BSD and Linux it's OpenSSH. OpenSSH is not just ssh though, there are scp, sftp, ssh-keygen, ssh-agent, sshd, etc, etc all of which do different things, but they use the same encryption and key handling techniques.
 
Old 12-28-2003, 12:11 PM   #4
mac_phil
Member
 
Registered: Sep 2003
Distribution: Mandrake 10.0
Posts: 200

Rep: Reputation: 30
Quote:
Originally posted by druuna
To my knowledge you cannot copy (secure or not) with SSH.
You can with sftp.
 
Old 12-28-2003, 12:21 PM   #5
phobox
Member
 
Registered: Dec 2003
Location: Columbus, OH USA
Distribution: Debian Knoppix Kanotix Sidux
Posts: 73

Rep: Reputation: 15
Isn't it possible to ssh into a box, the run ftp from there back into your own?
 
Old 12-28-2003, 02:00 PM   #6
anon237
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
You can setup a ssh tunnel between to machines and use that to run a (insecure) tcp connection.
 
Old 12-28-2003, 03:23 PM   #7
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Quote:
Originally posted by phobox
Isn't it possible to ssh into a box, the run ftp from there back into your own?
I believe that's exactly what sftp does. It uses an ftp-like program through an encrypted SSH tunnel. That saves you the effort of having to manually setup an SSH tunnel and then turn on the ftp client/server.
 
Old 12-28-2003, 10:41 PM   #8
palanisaravanan
Member
 
Registered: Oct 2003
Location: India
Distribution: Debian
Posts: 95

Original Poster
Rep: Reputation: 15
I disgree with u ppl.U can copy using ssh.
U can copy using ssh.The command is
ssh -e none -T user@xxx.xxx.xxx.xxx cat /tmp/somefile_tobe_transferred > /tmp/test
I Tried it in my network.
 
Old 12-28-2003, 11:07 PM   #9
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Quote:
ssh -e none -T user@xxx.xxx.xxx.xxx cat /tmp/somefile_tobe_transferred > /tmp/test
Yep, I just transfered an .rtf file that way and it is readable.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh and scp problem DAChristen29 Linux - Networking 4 01-05-2005 04:27 PM
Problems with SSH / SCP henriette Linux - Networking 1 04-28-2004 01:52 AM
Ssh/scp Gui MattLaw Linux - Networking 2 02-18-2004 04:45 PM
SSH - where are scp and sftp satimis Linux - Networking 2 11-15-2003 10:27 AM
ssh scp problem ckupris Linux - Networking 6 10-11-2003 05:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration