Home » Linux OS and Software » How-To » sftp in Ubuntu 9.04 64 bit
Sun, 07 June 2009 21:40 Go to next message
Registered: June 2009
Messages: 2
I like using sftp to maintain my web site in my /home/myuser directory, and this works fine with the Ubuntu 8.10 images I have used. But with the Ubuntu 9.04 64 bit image, it doesn't work - I can only log in with sftp as root Confused

Is this a 'feature' of Jaunty (like the vi default for visudo), or something broken? Whatever, how can I fix it?
Mon, 08 June 2009 11:28 Go to previous messageGo to next message
Registered: May 2009
Messages: 21
[DELETED] Sorry I read wrong Razz Very Happy Very Happy Very Happy
I thought you COULDN'T login as root haha

Can you post your /etc/ssh/sshd_config file? It contains no secret. You're probably missing something with authentication

[Updated on: Mon, 08 June 2009 11:32]

Mon, 08 June 2009 13:40 Go to previous messageGo to next message
Registered: June 2009
Messages: 2
Sure. I had looked at this already and changed the line
#PasswordAuthentication yes

as you can see below, but it did no good. The file is exactly the same (with that line commented out) as on an 8.04 server where it is working right now.

# Package generated configuration file
# See the sshd(8) manpage for details

# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile	%h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM yes
Thu, 11 June 2009 17:10 Go to previous message
Registered: May 2009
Messages: 21
Your configuration seems correc since there is no limitation on logins.

I think that you messed something up when creating your user.

Forgive me if I don't always use the console like true geeks, but I prefer a GUI for some common operations.
In order to create a user, I use openSUSE's YaST (Yet Another Setup Tool) which is a very easy GUI that works both on console and X11 tunnelling.

The point is the following: I have a GUI option to enable login for a certain user, and disabling it disallows the user to access the system from SSH. I don't currently know what is the correspondant unix command, or passwd entry, or anything else. I've tried to google around but I found nothing.

Another issue might be with the password. I remember that on my old laptop, passwd command truncated the password to 8 chars actually disabling my "su" command until format.

Just to be sure, do the following as root:

*Run "passwd [user]" with your desired username to change his password to a short password, then try to login with that account
*Run "su [user]" or "su -u [user]" depending on your system in order to test if you can impersonate that account

If nothing works, try to set up a certificate for the user then try to login with SSH as that user. If certificate authentication fails, the user is not set up correctly and then you might have to recreate it possibly using Ubuntu's wizard tools. If certificate authentication succeeds, it's a password problem you have to solve.
Previous Topic:Configure a vps to send email?
Next Topic:Outgoing Email Server Setup
Goto Forum:
  


Current Time: Sat Dec 16 23:05:36 EST 2017
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2006 FUD Forum Bulletin Board Software