# [Solved] SSH Secure File Transfer fails with OpenSSH!

## cgmd

Hi, All!

I have a gentoo box with OpenSSh, and I connect to it without problem from my gentoo laptop, logging in as either root or user.

Trying to connect (using SSH Secure File Transfer) from my Windows pc to the gentoo box, I can only log in as root. When I try to connect as "user" I get:  *Quote:*   

> Error
> 
> File transfer server could not be started or it exited unexpectedly.
> 
> Exit value 0 was returned. Most likely the sftp-server is not in the path of the user on the server side.

 

The only mention of "sftp-server" in my /etc/ssh/sshd_config file is:

```
# override default of no subsystems

Subsystem    sftp    /usr/lib/misc/sftp-server
```

Does anyone have insight into this problem??

Thanks!

----------

## benster

is "SSH Secure File Transfer" the name of the windows program you're trying to use?

----------

## cgmd

 *Quote:*   

> is "SSH Secure File Transfer" the name of the windows program you're trying to use?

 

It is, indeed, the name of the software, which is available here.

Perhaps that is the problem!   :Confused: 

Are there suggestions as to a better ssh client for use on a Windows pc to access a linux box? I would readily change, if the cost is right (free).   :Smile: 

----------

## think4urs11

 *cgmd wrote:*   

> Are there suggestions as to a better ssh client for use on a Windows pc to access a linux box? I would readily change, if the cost is right (free).  

 

Of course there are   :Wink: 

Putty (pscp/psftp)  :Arrow:  http://www.chiark.greenend.org.uk/~sgtatham/putty/

Bitvise Tunnelier   :Arrow:  http://www.bitvise.com/tunnelier.html

WinSCP   :Arrow:  http://winscp.net/eng/index.php

just two name a few candidates.

----------

## Soef

Filezilla works like a charm too, it supports al kind of protocols including SFTP(SSH2) and normal FTP.

Some SFTP(SSH) clients can't connect with standard settings of you sshd server. To fix this, make sure this line is set "yes" your /etc/ssh/sshd_config:

```

# To disable tunneled clear text passwords, change to no here!

PasswordAuthentication yes

```

----------

## Jfr0

You don't really permit root logins over ssh right?  :Wink: 

Try some of those other programs and see if they help.  

Do you have anything producing output in your bashrcs ?

If you are using pub key auth then you should prob use Win SCP or putty's scp client. Otherwise you have to use Putty Agent (ie this works with Filezilla for pub key auth)

I assume that you can ssh to the remote host? 

I dont think passwordauthentication should be set to yes. Mine is set to no. 

Here is an example sshd_config  minus comments

```

Port 22

Protocol 2

SyslogFacility AUTH

LogLevel INFO

PermitRootLogin no

MaxAuthTries 6

RhostsRSAAuthentication no

PasswordAuthentication no

PermitEmptyPasswords no

UsePAM yes

X11Forwarding yes

UseLogin no

Compression delayed 

Subsystem       sftp    /usr/lib64/misc/sftp-server

```

----------

## Soef

 *Jfr0 wrote:*   

> You don't really permit root logins over ssh right? 
> 
> I dont think passwordauthentication should be set to yes. Mine is set to no. 
> 
> 

 

This totaly depends on the client which is connecting to the server. Try connecting SFTP over SSH with jEdit's FTP plugin. You won't get any far without passwordauthenication set to yes. I don't believe this is the only client who's needing this option, that's why I mentioned the options which may work with the client cgmd is using.

----------

## Jfr0

Well I had used the ssh.com client before, and I just checked and it works fine with the above settings.

----------

## cgmd

Think4UrS11 wrote:

 *Quote:*   

> Of course there are 
> 
> Putty (pscp/psftp)  http://www.chiark.greenend.org.uk/~sgtatham/putty/
> 
> Bitvise Tunnelier  http://www.bitvise.com/tunnelier.html
> ...

 

Thanks for that advice. I'm having great success with Bitvise Tunnelier as an alternative to my prior SFTP(SSH) client. There is one glitch, however, that I am experiencing...

Bitvise Tunnelier opens both a terminal window as well as a SFTP window for 2 of my remote desktop boxes, but for my remote gentoo laptop, only a terminal window opens... no SFTP window.  :Confused: 

Where may I have gone wrong in setting up the laptop for SFTP?

Thanks to all for the advice in this thread!

----------

## Jfr0

Are all the sshd_config files the same?

----------

## cgmd

 *Quote:*   

> Are all the sshd_config files the same?

 

The sshd_config files are identical on the gentoo box and the gentoo laptop. Tunnelier is on my Windows pc and I don't know about it's config file. It seems to me, though, if Tunnelier can open an SFTP window for the gentoo box, it should do likewise for the gentoo laptop.  :Confused: 

----------

## ChestBursterXP

 *cgmd wrote:*   

> 
> 
> Trying to connect (using SSH Secure File Transfer) from my Windows pc to the gentoo box, I can only log in as root. When I try to connect as "user" I get:  *Quote:*   Error
> 
> File transfer server could not be started or it exited unexpectedly.
> ...

 

Oddly enough, I was encountering the exact same problem (using SSH.com's Secure File Transfer client, only root could login, exact same error message), and found out it was because the permissions on /dev/null had been changed to 0600 (presumably by udev).  If you login as root, then execute 

```
chmod 0666 /dev/null
```

 you can then login as a non-privileged user with SSH.com's Secure File Transfer client.

----------

