OpenSSH on Windows Server Hint
-
A few days ago, a client requested a secure drop resource/location for a series of batch files from another vendor who insisted on sftp. This meant that I needed to install openssh on my h/o server and get it working. I overconfidently replied that I could have it working before the end of the day. (a couple of hours) The OpenSSH package installer for Windows is great, and actually does just about everything for you...keys created, services are started, firewall rules created, etc...easy peasy right? 2.5 frustrating days later dealing with really vague connection errors (-1?) in WinSCP/logs while connecting effortlessly through powershell, I finally got it working! The first 5 articles I read on the process failed to mention that the path system environment variable needed an entry to the OpenSSH folder! :doh: After doing that, and at least getting a connection, all the settings in the service config file made more sense. I must have restarted that service a hundred times trying to get it to work. The user was granted access but since there was not a system path to the sftp-server, the connection was aborted. That's why ssh in powershell worked when sftp wouldn't. I was also able to get sftp working on one of our azure vms which for still unknown reason fails to connect with ftp, so now I've at least got a primary and secondary sftp resource available. Anyway, this whole escapade revealed my ineptness at troubleshooting server/network issues. At least I learned something and am only posting here so that possibly someone else doesn't waste as much time as I did. I'm a solo developer and responsible for all the company's software and hardware assets both physical and virtual. Lately, much of the server related stuff I've had to muck around in is security related...switching to https and managing certs, getting a cert working with the email server, and now adding sftp services. I'd much rather be doing development! :) Rant over! Have a great weekend! :laugh:
"Go forth into the source" - Neal Morse "Hope is contagious"
-
A few days ago, a client requested a secure drop resource/location for a series of batch files from another vendor who insisted on sftp. This meant that I needed to install openssh on my h/o server and get it working. I overconfidently replied that I could have it working before the end of the day. (a couple of hours) The OpenSSH package installer for Windows is great, and actually does just about everything for you...keys created, services are started, firewall rules created, etc...easy peasy right? 2.5 frustrating days later dealing with really vague connection errors (-1?) in WinSCP/logs while connecting effortlessly through powershell, I finally got it working! The first 5 articles I read on the process failed to mention that the path system environment variable needed an entry to the OpenSSH folder! :doh: After doing that, and at least getting a connection, all the settings in the service config file made more sense. I must have restarted that service a hundred times trying to get it to work. The user was granted access but since there was not a system path to the sftp-server, the connection was aborted. That's why ssh in powershell worked when sftp wouldn't. I was also able to get sftp working on one of our azure vms which for still unknown reason fails to connect with ftp, so now I've at least got a primary and secondary sftp resource available. Anyway, this whole escapade revealed my ineptness at troubleshooting server/network issues. At least I learned something and am only posting here so that possibly someone else doesn't waste as much time as I did. I'm a solo developer and responsible for all the company's software and hardware assets both physical and virtual. Lately, much of the server related stuff I've had to muck around in is security related...switching to https and managing certs, getting a cert working with the email server, and now adding sftp services. I'd much rather be doing development! :) Rant over! Have a great weekend! :laugh:
"Go forth into the source" - Neal Morse "Hope is contagious"
Pretty much the same experience getting SSH to work on a Gitea server :-\