LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 11-15-2007, 01:25 PM   #1
dave`2005
Member
 
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 270

Rep: Reputation: 30
Can't connect via SCP


Hi all,

I recently installed Ubuntu and when trying to connect to it via SCP from my windows machine it just says login denied, do i have to enable SCP somewhere?

Any help appreciated.
 
Old 11-15-2007, 01:42 PM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
SCP is for securely copying (SCP = "Secure CoPy") files from client A to client B via SSH.

You don't log in with SCP, it's a one-shot command at copying a file from client A to a specified location at client B:
Code:
$ scp myfile.txt user@host:/home/user
If you're on client B (Windows) trying to log in to client A (Linux), client A needs to have an SSHD (SSH daemon - such as OpenSSH) installed and running, and you need to connect from client B using "ssh user@host".
 
Old 11-15-2007, 05:44 PM   #3
dave`2005
Member
 
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 270

Original Poster
Rep: Reputation: 30
I use winSCP on the windows machine.

I chose openSSH to be installed somewhere in the ubuntu install options i think.

Last edited by dave`2005; 11-15-2007 at 05:47 PM.
 
Old 11-15-2007, 08:37 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You can run the following to see if sshd is running:
Code:
netstat -a | egrep ':(ssh|\b22\b)'
If it is running, you'll see something like this:
Code:
tcp        0      0 *:ssh                   *:*                     LISTEN
I don't know the commands to start/stop daemons on Ubuntu, but it may be something like /etc/init.d/sshd start

Will the Ubuntu box be exposed to the internet? If so, you should change some of the /etc/ssh/sshd_config settings. The main ones I use are:
Code:
Protocol 2
AllowUsers steve
PermitRootLogin no
PasswordAuthentication no
Subsystem       sftp    /usr/libexec/sftp-server
I use public key authentication so I disable password authentication - it's up to you, depending on what you require. Once sshd is running, you should be able to use scp, ssh and sftp as indienick described.
 
  


Reply



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
scp does not work and gives the following error message: scp: FATAL: Executing ssh1 i akay Linux - Networking 16 09-28-2008 11:41 PM
How can I use scp Jzarecta Linux - Networking 6 04-15-2006 02:52 AM
SCP how to the_rhino Linux - Newbie 5 02-11-2005 07:50 PM
What is SCP? radam Linux - Software 2 07-20-2004 07:07 PM
Help with SCP lfindle Linux - Newbie 14 07-09-2002 02:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 01:09 PM.

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