Koozali.org: home of the SME Server

connection via ssh - newbie

ldavies

connection via ssh - newbie
« on: March 23, 2004, 06:41:54 AM »
All I want to do is transfer files to an i-bay so I create a webite in it.


I am trying to connect from my client computer on the lan (ip 192.168.0.2) to e-smith server using ssh with WinSCP3.

Network is as follows:

internet
|
x.x.x.x (static ip from isp)
esmith server and gateway - dedictated
192.168.1.1
|
192.168.1.2
router
192.168.0.1
|
pc client
192.168.0.2

I have set up the e-smith server as follows:

Secure shell access - private
Allow admin command access over secure shell - no
Allow secure shell access using standard passwords - yes

In WinSCP3 I put the following:

Hostname       192.168.1.1
Port number    22
Username       admin
Password       XXXXXXX

And I get the following error message:

"Cannot initialize SFTP protocol.  Is the host running a SFTP server?"
"Connection has unexpectedly closed.  Server sent command exit status 255"

PLEASE HELP  :-D

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
connection via ssh - newbie
« Reply #1 on: March 23, 2004, 08:57:33 AM »
I tried to replicate your problem on one of our server used for sftp - working great, but strangely enough, I could not log using admin - never tried before...

Anyway, try this: (i) create a group called sftp_clients (or whatever) in which are included all users using the service + admin (ii) in ibay property, select group sftp_clients with r/w for the group (iii) allow public access (entire internet password required) (iv) install usershellaccess - get e-smith-usershellaccess-0.1-2.noarch.rpm from a GPL repository (search this site or go http://www.dungog.net under GPL). This will create a User Shell Acces entry under security. (v) Enable shell access for the user you wish to give access to your ibay (vi) log as THIS user in winscp - do not forget to tick sftp.  This works for me.  Ask if not sure how to install usershellaccess. its easy.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

bobk

connection via ssh - newbie
« Reply #2 on: March 23, 2004, 11:47:31 AM »
Loging in as "admin", or any other user, using WinSCP3 does not work. Login as "root" and it should work fine.

Anonymous

connection via ssh - newbie
« Reply #3 on: March 23, 2004, 01:29:32 PM »
hmmm

logging as users + passwords works fine, we do it every day for the purpose of file exchange under sftp as it is secure as opposed to ftp.  Logging as root raises security issues, and should  be discouraged unless absolutely necessary I would think.  

All this is rather academic in the contect of the current posting:  moving files from a box on the local network can be done over samba, or even plain old ftp restricted to local network.

ldavies

connection via ssh - newbie
« Reply #4 on: March 24, 2004, 05:44:27 AM »
I tried loggin in as root and have the same error message except it allows me to put my password in 3 times and then boots me out for good.

More suggestions are welcome.  Are the logins I used correct?

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
connection via ssh - newbie
« Reply #5 on: March 24, 2004, 11:21:37 AM »
You have to enable "allow administrative command" in remote access for this to work.  Which bring us back to security issue - loging as root unless absolutely necessary is not a good idea.  If you want to use sftp, configure your box to allow login under sftp a regular user.  At the moment, it is not an issue since you log from the local (=hopefully safe) network, but getting into good habits will pay in the end.  chris.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

ldavies

connection via ssh - newbie
« Reply #6 on: March 26, 2004, 06:11:37 AM »
problem solved.

i can transfer files OK with a program winscp3.  still not sure what i was doing wrong with ssh though