# Problem with SFTP and FTP SSL



## pitos (Oct 9, 2009)

Hi, 

NAS Network Server
Operating sytem: Linux version 2.6.15
File server (CIFS): Version 3.0.23d
Database Server: /usr/local/mysql/bin/mysqld Ver 4.1.16 for none-linux-gnueabi on armeb

Above server supports SSH but I have problems with SFTP and SCP protocol under SSH and FTPS. I asked manufacturer if it supports these protocols but I didn't get the answer 
All below troubleshooting have been done under Vista Home Pre
I logged in as a root (Putty via SSH) but both WinSCP and Putty don't execute SCP command so I can't copy, move files to different host within LAN.

error:
Cannot execute SCP to start transfer. Please make sure that SCP is installed on the server and path to it is included in PATH. You may also try SFTP instead of SCP.
Command failed with return code 127.


I can't initialize SFTP with both programs.
Tried login to: /bin/sftp-server and sudo su -c /bin/sftp-server via SFTP 5/4/3

error:
"Cannot initialize SFTP protocol. Is the host running a SFTP server?"

I've checked the following: 
ssh yourhost /usr/bin/true -sh: "ssh: not found"
I couldn't find "sftp-server" in /bin/??? /usr/bin/??? 


Next I tried FTPS with WinSCP:
FTP over Implicit SSL/LTS - ports 990 and 989 forwarded to the server.
I set port 990 in the server interface and allowed SSL encryption.

errror: 
"SSL_connect: error in SSLv2/v3 read server hello A
Can't establish SSL connection
Disconnected from server
Connection failed."


FTP over Explicit (port 21) SSL - ports 21 and 20 forwarded to the server and port 21 set up in the Sever interface.

error:
"Could not retrieve directory listing
Illegal PORT command."
Then I'm connected to the /home but access is denied if I want to access /root (the same situation occurs with TLS)


I can connect via FTP with no encryption and it works well.

I'd like to use SFTP or FTP via SSL
Do I have to install third party software like OpenSSH to be able to use SFTP?
Shall I forward different ports to allow FTP via SSL/TLS ?

Thanks
Patrick


----------

