LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-05-2014, 05:13 AM   #1
Floob
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Rep: Reputation: 0
Question Cant SFTP to server - authentication issue?


I’ve been trying to set up an SFTP user on our server but authentication always fails.

/etc/passwd shows user sunrisetest and we’re typing the password in correctly but we’re getting a authentication response in filezilla when trying to connect;

Error: Authentication failed.
Error: Critical error
Error: Could not connect to server

When running tail -20 /var/log/auth.log we get the following result;

pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=***.***.***.***.static.swisp.co.uk user=sunrisetest
Failed password for sunrisetest from ***.***.***.*** port 65042 ssh2

I’m able to su as sunrisetest when logged in as root but not login directly as sunrisetest. Would anyone be able to shed some light on what I’m doing wrong here?
 
Old 03-05-2014, 05:37 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,467

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by Floob View Post
IWould anyone be able to shed some light on what I’m doing wrong here?
Honestly, it really does look like you're using the wrong password for the user. Reset the password and try again.

Another thing to look at is: SFTP tunnels FTP over SSH so ensure that your user also has permissions to log in to SSH.

Last edited by TenTenths; 03-05-2014 at 05:39 AM.
 
Old 03-05-2014, 07:31 AM   #3
Floob
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Original Poster
Rep: Reputation: 0
I’ve reset the password numerous times thinking that might be the problem but the error message doesn’t change. How do I ensure my user has permission to log in to SSH?
 
Old 03-05-2014, 09:35 AM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,288
Blog Entries: 3

Rep: Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718
You could just try logging in via ssh to see if you can do it. If you are on a legacy system then you can download PuTTY and try that though it will not have as much diagnostic capability. There is also a 'portable' version if that is needed.

On the server you can also check what kind of configuration the user sunrisetest has to deal with:

Code:
sshd -TChost=serverip,addr=clientip,user=sunrisetest | less
 
Old 03-05-2014, 10:19 AM   #5
Floob
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Original Poster
Rep: Reputation: 0
I’ve done everything you’ve suggested with no luck. When logging in to SSH, the terminal just closes itself.

Once su as sunriseteset I did sftp -P 3377 -v sunrisetest@***.***.***.***

And got the following response:
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to ***.***.***.*** [***.***.***.***] port 3377.
debug1: connect to address ***.***.***.*** port 3377: Connection refused
ssh: connect to host ***.***.***.*** port 3377: Connection refused
Couldn't read packet: Connection reset by peer

Does this provide a little more info to help with the issue I’m having?
 
Old 03-05-2014, 10:38 AM   #6
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,288
Blog Entries: 3

Rep: Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718Reputation: 3718
Which port is sshd really listening on? It looks like you are trying to connect to a port on which it is not listening.
 
  


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
SFTP Issue with Ubuntu 12 server durgaprasath Linux - Server 1 02-10-2014 04:44 AM
configure ssh authentication using password file and sftp/scp authentication using ld cameliab Linux - Software 1 08-29-2011 03:28 AM
Chrooted OpenSSH SFTP server logging issue Sea-you Linux - Server 2 08-03-2011 09:09 PM
sftp authentication jackd1000 Red Hat 3 01-07-2009 10:05 AM
mail server authentication issue (w/netware) jillu Linux - Software 0 09-17-2004 06:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:23 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