Koozali.org: home of the SME Server

Strange SSH Remote Access

Offline gwalker_ne8

  • *
  • 9
  • +0/-0
Strange SSH Remote Access
« on: July 25, 2007, 04:26:52 PM »
Hi All,

I seem to be having trouble with getting access to my SME Server 7.2 via SSH.
I have setup everything under SSH settings for local access.
I have specified the host that I am connecting from under remote management.

When I try to connect via Putty I get "Server unexpectedly closed network connection", however when I change access to entire internet I get the usual login.

Obviously I don’t want to leave this setting on entire internet.

Can anybody suggest what has gone wrong?

Graham

Offline mmccarn

  • *
  • 2,657
  • +10/-0
Strange SSH Remote Access
« Reply #1 on: July 25, 2007, 04:52:53 PM »
server-manager::Security::remote access has 4 sections.  

The first section, "PPTP settings" refers to pptp VPNs.

The second section, "Remote Management" refers to https access to /server-manager

The third section, "Secure Shell Settings" refers to ssh access

The fourth section, "FTP Settings" refers to FTP.

The 'SSH' section doesn't have a place to enter individual remote hosts for access, so I suspect you've been setting the 'https://.../server-manager' remote host settings, then trying to use them from ssh... which won't work.

Here's what you can do to allow remote access to ssh while minimizing your security exposure:[list=a]
  • use a non-standard port (now easy, using server-manager).  This significantly reduces the noise in my log files from people trying to break in to my servers, which I find comforting.  I do this in addition to one of the following options...
  • Allow public access, deny password access, and figure out how to use public/private keys (this is the recommended solution, I think)
  • Allow public access, allow password access, pick a really good password, and eliminate anyone that learns your password (not the approved solution)
  • Allow public access using passwords, then use custom db variables to restrict remote access.  (This appears to be what you are hoping to do).  The command will look something like db configuration setprop sshd AllowHosts a.b.c.d; see http://wiki.contribs.org/DB_Variables_Configuration#Additional_information_on_customizing_iptables.  
    More secure than password-only Internet access, less secure than public/private key access[/list:o]

Offline gwalker_ne8

  • *
  • 9
  • +0/-0
Strange SSH Remote Access
« Reply #2 on: July 25, 2007, 05:12:37 PM »
Thanks for your quick response.

I was sure that I was able to access my server via SSH it via my work connection before, while I had the local option enabled in the SSH settings, anyway I'll give your suggestion a go.

G

Offline shawnbishop

  • *****
  • 298
  • +0/-0
Strange SSH Remote Access
« Reply #3 on: July 26, 2007, 10:10:36 AM »
Also

Check what version of PUTTY you are using, I found that SME Server doesnt allow connections from PUTTY running Version 1 of SSH