This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sophos UTM - how to config SSH for public key auth?

Hi - I've recently moved from pfsense to Sophos UTM Home Edition.  Am accustomed to using user-specific public keys for SSH access.  How do you configure this under Sophos UTM?  I've been googling and searching this forum for a guide w/o success.

Have enabled SSH Access under Management > System Settings > Shell Access.  Currently set to allow password authentication.  However I'd like something more secure than a generic user login and password.

1.) How do you create the needed public key in Windows (i.e. puttygen) so that it's in the appropriate format for Sophos?
2.) how do you get it to Sophos UTM?  I assume you use WinSCP to copy the public key?
3.) Where (path) does the public keyfile need to go?
4.) Once public keyfile has been copied to Sophos UTM, and Allow Public Key Authentication has been enabled, how do you add the public keyfile under Authorized keys for loginuser?

When I login via SSH via basic password authentication, I do not see an ~/.ssh folder currently under /home/login.

Thanks in advance.


This thread was automatically locked due to age.
  • Puttygen is pretty much self-explanatory: click Generate and save the two files.  Before closing the window, select and copy the displayed text of the public key.

    Then in WebAdmin, simply click the green + to add a new public key, paste the copied text, and click Apply. That's it, it's uploaded.
  • Puttygen is pretty much self-explanatory: click Generate and save the two files.  Before closing the window, select and copy the displayed text of the public key.

    Then in WebAdmin, simply click the green + to add a new public key, paste the copied text, and click Apply. That's it, it's uploaded.


    Thanks so much jetkins for the simple, straight forward explanation.  I apologize for the basic question, but am only a few days into Sophos UTM from pfsense and trying to overcome my learning curve.  Needless to say I've just followed your steps and connected via Putty w/public key auth.
  • You're welcome - glad you got it sorted.  Sometimes we tend to over-think problems and miss the simple solutions. [:)]
  • jetkins, if you wouldn't mind, I have another question... in pfsense I had Squid transparent proxy enabled on port 3128 (default).  I could then:

    1.) initiate a putty SSH connection via port 22
    2.) create a putty tunnel say localhost:5910 which would point to internal LAN IP 192.168.0.5:3389 for Remote Desktop to a PC

    In Sophos UTM:
    1.) I've setup Web Protection > Web Filtering Profiles > Proxy Profiles (source network: any, transparent mode enabled)
    2.) step #1 works fine as expected - ssh connection is made
    3.) if I browse to What Is My IP | Shows Your IP Address., it confirms my browsing session is originating from the internet IP of the Sophos UTM (good)

    However, I cannot RDP to localhost:5910 or 127.0.0.1:5910 as the connection isn't made.  I do have the Sophos web filtering setup on the default port 8080.  But I wasn't sure how to setup another proxy if necessary to channel other traffic through it?

    Thanks!
  • Hi, Miles, and welcome to the User BB!

    As you're new here, you wouldn't know that one of rules is "one topic" per thread.  Please post this question in a new thread with an appropriate title in the appropriate forum.  Once you start a new thread, any moderator can move it to another forum if necessary.

    You'll want to change 'Source network' away from "Any" immediately as that exposes your proxy to use by anyone on the Internet.

    Cheers - Bob
  • BAlfson - sorry, I apologize for the forum policy violation.  Will do.

    I noticed once I changed my PROXY source network from ANY to Internal Network could no longer browse thru it.

    EDIT: I've since changed source network = internal address and adjusted my Putty SSH tunnel logic from: 127.0.0.1:8080 to 192.168.0.1:8080 (192.168.0.1 is the LAN IP of my Sophos UTM) and web browsing has resumed thru the SSH tunnel.  Still cannot get RDP traffic thru it - yet.

    BTW - saw you're from OK City.  Am in NW Arkansas.  Not too far east of you.  Small world.