Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

OpenSSH for Windows 7

Posted on 2012-03-20
17
Medium Priority
?
4,426 Views
Last Modified: 2012-04-08
I installed OpenSSH for Windows 7
OpenSSH and followed the quick guide.In CMD in the bin dir for OpenSSH, mkgroup -l > ..\etc\group and mkpasswd -l > ..\etc\passwd. Then net start opensshd. It says it starts successively. When I try to connect to it in putty it throws up a fatal error saying,"Network Error: Connection Refused." I'm connecting to 127.0.0.1 on the same computer. I even tried ssh in C:\Program Files (x86)\OpenSSH\bin, ssh Tyler@127.0.0.1. It says,   "ssh: connect to host 127.0.0.1 port 22: Connection refused." I even tried my local IP of 10.0.0.33 on another computer in putty. Both computers are running Windows 7 Home Premium. Both have passwords for the Windows account. I attached the group and passwd files below. They are normal computers connected via Wi-Fi on the same router. NOT hooked up to Domains or complicated stuff. Help. I looked even for an answer on the fourms here, but did not find any answers. Thanks. :)
group
passwd
0
Comment
Question by:Tylerwin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 7
17 Comments
 
LVL 79

Expert Comment

by:arnold
ID: 37747057
Run netstat -an |find ":22"
You have to make sure that host keys have been generate.
You may have to open port 22 in the advanced firewall settings.
0
 
LVL 1

Author Comment

by:Tylerwin
ID: 37750395
I ran netstat -an |find ":22" and did not find anything. The host keys have been generated. I even disabled the firewall on my computer. When I try to restart the service in services.msc I get this error,"Windows could not start the OpenSSH service on Local Computer. Error 1067: The process terminated unexpectedly." I tried restarting the computer too. I don't know why this is happening.
pic.JPG
0
 
LVL 79

Expert Comment

by:arnold
ID: 37750530
What is your sshd_config file reflect for the port to which it should bind. Check advanced settings for firewall and add the sshd program to the allow.  Even though you have firewall disabled, it might still deny the service from binding to the privileged 22 port.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
LVL 1

Author Comment

by:Tylerwin
ID: 37750715
Here is my sshd_config file in attachments. I don't know how to 'allow' the sshd program in the firewall. I'm using Norton Internet Security 2012.
sshd-config
0
 
LVL 1

Author Comment

by:Tylerwin
ID: 37750759
Its not a program per-say, its a service running in windows that is running a executable at C:\Program Files (x86)\OpenSSH\bin\cygrunsrv.exe.
pic2.JPG
0
 
LVL 79

Expert Comment

by:arnold
ID: 37751017
The service might be being denied the ability to bind to port 22.
Does your system have any ani-virus app?
You could add that app to allow it to bind to port 22.
0
 
LVL 1

Author Comment

by:Tylerwin
ID: 37752865
OK, how do I do that? I'm using Norton Internet Security 2012.
0
 
LVL 1

Author Comment

by:Tylerwin
ID: 37753036
I even tried installing OpenSSH on another computer that has MSE and Windows firewall turned off and allowed the program to run through the firewall. I don't know why this is happining. I still get the same error msg.
0
 
LVL 79

Expert Comment

by:arnold
ID: 37753080
Uncomment the listen IPV4 and ipv6 entry in sshd_config

I do not have a cygwin setup in a windows 7 environment so it is not clear what is not working, based on your responses the binding to 0.0.0.0 port 22 is not occurring.
0
 
LVL 1

Author Comment

by:Tylerwin
ID: 37753304
Can you tell me what to uncomment in sshd_config file? There is no ipv4 or ipv6 to uncomment.
0
 
LVL 79

Expert Comment

by:arnold
ID: 37753440
Port 22
#Protocol 2,1
Protocol 2
ListenAddress 0.0.0.0
#ListenAddress ::

Try that first.

Check whether your DDE settings are what prevents it from running.
See the log file
http://www.cs.technion.ac.il/~imaman/misc/openssh.html
C:\Program Files (x86)\OpenSSH\var\log\OpenSSHd.log
0
 
LVL 1

Author Comment

by:Tylerwin
ID: 37753772
OK, on another computer thats running MSE and Windows Firewall both turned off I uninstalled OpenSSH and re-installed it. I ran mkgroup -l > ..\etc\group and mkpasswd -l > ..\etc\passwd. Then edited the sshd_config file just like you said. And It did the same error again. See picture below. Some times in services.msc when I start the OpenSSH service it runs for a second then shuts down.Then when I run it again it gives me the same error msg.
It would be nice if you could try installing OpenSSH in Windows 7 and try and get it running for yourself. Heres the link (http://sourceforge.net/projects/sshwindows/files/OpenSSH%20for%20Windows%20-%20Release/). And for some reason there is no log file where you specified.
pic3.png
0
 
LVL 79

Expert Comment

by:arnold
ID: 37753942
I've not set this up on win 7 so can not say for sure what is preventing it from running.
I'll see if I can setup on a test system.
0
 
LVL 1

Author Comment

by:Tylerwin
ID: 37755547
Thanks. Let me know if you can get it running.
0
 
LVL 1

Accepted Solution

by:
Tylerwin earned 0 total points
ID: 37804362
Nobody posted an answer here. So I found the solution. I installed cygwin and openssh on that, and it works. I'm not using the OpenSSH program but installing the package in cygwin.
Here's the video I made on how to do that. (http://youtu.be/DHAEsUL6rsw)
0
 
LVL 79

Expert Comment

by:arnold
ID: 37804399
Sorry it side tracked.
Glad to hear you've resolved the issue.
0
 
LVL 1

Author Closing Comment

by:Tylerwin
ID: 37820934
The program OpenSSH for Windows is old and doesn't work with Windows 7.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you thought ransomware was bad, think again! Doxware has the potential to be even more damaging.
The recent Petya-like ransomware attack served a big blow to hundreds of banks, corporations and government offices The Acronis blog takes a closer look at this damaging worm to see what’s behind it – and offers up tips on how you can safeguard your…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question