-   Linux - Server (
-   -   Can sftp into root account, but not created user? (

ashamanmiller 01-29-2012 08:59 PM

Can sftp into root account, but not created user?
I installed Ubuntu Server 9.10, and started configuring it. Changed my SSH port to a more secure one, etc etc. The primary account I'm using right now (yes I know it's not advisable but I get tired of typing "sudo" every time I wish to make a change) is the root. I can use FileZilla and quick connect to the root account at the IP address with that port. However, I went to and started following the directions for the FTP section. I created the account (though not named webuser1), configured my shell, etc, etc. However, while I can ftp and ssh my root account, I cannot SSH or FTP into my created users account(If I recall correctly, I shouldn't be able to SSH, which is great!) However, I need to set it up correctly for web users to have their own accounts... however every time I attempt to connect to that account (quick connect) with that I IP (sftp://IP here) it closes out with a "connection closed by server error code 1". Any help? Thanks!

FancY_Hat 01-29-2012 09:16 PM

It may be helpful to get a look at your permissions for the file. Are able to post the output of

ls -al

ashamanmiller 01-29-2012 09:52 PM

ls -al:

total 32
drwx------ 5 root root 4096 2012-01-27 14:03 .
drwxr-xr-x 21 root root 4096 2012-01-27 13:22 ..
drwx------ 2 root root 4096 2012-01-27 13:10 .aptitude
-rw------- 1 root root 2824 2012-01-29 13:33 .bash_history
-rw-r--r-- 1 root root 3106 2010-04-23 00:45 .bashrc
drwxr-xr-x 2 root root 4096 2012-01-27 13:45 .cache
-rw-r--r-- 1 root root 140 2010-04-23 00:45 .profile
drwxr-xr-x 2 root root 4096 2012-01-27 13:43 .uml

rodrifra 01-30-2012 01:38 AM

How did you create your users (with a program or by yourself)?
Users must have an entry in /etc/passwd, /etc/group and have created their /home/username directory.

deep27ak 01-30-2012 03:52 AM

can you login through command prompt using your port no


#sftp -v -oPort=xxx

ashamanmiller 01-30-2012 06:33 AM

I used
"cd /var/www
mkdir webuser1
useradd webuser1 p xxxx d /var/www/webuser1 s /bin/false
chown webuser1 webuser1
passwd webuser1"

after adding "bin/false" to the /etc/shells file.
Then I edited the "proftpd.conf" file to jail the users to their home directory.

Also, did you mean through command line in Linux or command prompt in Windows, since you said command prompt?

ashamanmiller 01-30-2012 10:24 PM

I would really appreciate help as quickly as possible, as this web server needs to be up and running. Sorry to bother, but I'm kind of pushed for time right now. Thanks!

deep27ak 01-30-2012 10:35 PM

I meant on the linux box and show me the output

I have never worked with this server but here is one link which I found try this

ashamanmiller 01-31-2012 07:34 AM

I should mention that I am using PuTTY to SSH from Win7 to my machine, shouldn't I? Also, I'll take a look at that link, thanks!

Reuti 01-31-2012 04:02 PM

As deep27ak mentioned: you can use (triple) -v also to sftp from a Linux machine to get some error log (maybe the server itself).

ashamanmiller 01-31-2012 05:30 PM

When I tried to sftp from my server to my Win7 machine, I got the message "error: connection reset by peer".

Reuti 01-31-2012 05:35 PM

You run an ssh daemon on your Windows7 machine?

ashamanmiller 01-31-2012 08:22 PM

Again, yes. I ssh *from* my Win7 machine *to* my Ubuntu Server with a PuTTY(.exe) session.

ashamanmiller 02-02-2012 10:16 PM

Any help? Please? Or should I just install a different server software and try again? I need my web server up and running soon!

grim76 02-03-2012 08:31 AM

I don't think SFTP will work with /bin/false as a shell.

All times are GMT -5. The time now is 01:48 AM.