7

SUMMARY: SSH isn't doing anything.

> ssh user@[email protected]
> ssh oshdfojsfsdof -psd sdfisdfjdsf

(does nothing no matter what you pass to the commandline. No output, no errors, nothing)

FULLY STORY: I recently installed Cygwin so that I could run some rsyncs utilizing SSH keys without having to figure out how to set this up on Windows. I had it all working beautifully, but then found I needed to install more parts of Cygwin to have cron working. I added some packages, admittedly not paying as much attention as I should have to what packages I installed.

I setup the cron and found next morning it didn't work. Lots of debugging later and I realized that rsync was giving me errors because the SSH command simply doesn't want to be... well... ssh. It's as if I ran nothing at all.

I'm so confused because everything was working prior to running the Cygwin setup again and adding additional packages.

2
  • I had a similar problem. During a cygwin update, I skipped copying several DLL files. Now, following rkthkr's advice below, I see that the DLLs are indeed incompatible. Running setup as suggested by Chenming doesn't work for me. Neither does rebooting. I may need to uninstall cygwin completely! May 5, 2020 at 18:30
  • I find Bill's answer the most helpful in actually fixing the problem. @rkthkr's answer confirms the dll's are corrupt, but doesn't provide a path to fixing them. May 5, 2020 at 18:41

7 Answers 7

13

You could check with "strace" and see what it is not doing.

strace ssh -v hostname 
1
  • 1
    it is one of the bugs in cygwin. updating it by double clicking setup-86.exe or setup-86_64.exe to newer version would solve the problem. the version 1.7.32 had the bug fixed. you can check your version by uname -r Oct 3, 2014 at 10:53
5

Try the "-v" flag. Forces it to be more verbose and give you some kind of information about what it's doing.

1
  • 5
    Try ssh -vvv as well. The more vs, the more detailed the debug messages. Jun 15, 2009 at 20:49
2

Hey Matt, I had the same problem. So which version worked for you?

[Update after 2 hours]

Okay, I solved this problem by reinstalling every single thing. I did so by clicking the View button on the upper right corner couple times to list all the installed packages, and then re-install all of them again.

After all of them re-installed, ssh just started working.

Btw, "strace ssh -v hostname" tells me my cygz.dll was missing or corrupted. Don't know how that happened, and I don't even know where the cygz.dll was located.

1
1

So it seems that by telling Cygwin to install the previous version of everything I got it to work... which I did just before posting this thread. In retrospect the answers of everyone here are far more intelligent and I wish I had the opportunity to try them.

So it works, but I don't know why it didn't work in the first place. I will keep the suggestions you gave in mind however and thank everyone for their time and effort.

1

I had the same problem: no matter what arguments I passed to ssh, the command did nothing - just returned to the command prompt immediately. "which ssh" correctly reported "/usr/bin/ssh".

Running ssh with "strace ssh" gave me the a message box with the error cygz.dll was missing (as mentioned by Bill Hung). I reinstalled everything (from a different mirror) and ssh started to work. Also, "strace ssh" now provides useful output without the error.

I can't draw much of a conclusion other than "cygwin sometimes doesn't install perfectly and you might need to reinstall."

1

I had a similar problem - except that ssh kept giving me the error message that indicated that I had the command line arguments wrong.

I did not have them wrong.

To try to fix it, I did a complete re-install (using a different mirror - may not have mattered though), and it now works fine.

I would, however, mention that all you have to do to re-install everything is to start 'setup' and notice that there is a little thing at the top that says '[-] all <-> Default'. (Where I am using '<->' to indicate the dual arrows which sort of form a circle, and [-] for the box that can be [+] or [-]).

Click on 'Default' and it will change to something else ('Install'). Click it once more, it should say 'Reinstall' then hit 'Ok' and it will re-install everything. Yes, it takes a while. A LONG while.

Hope this helps someone.

Rusty

0

I would also recommend calling ssh with the full path to make sure you're running the correct executable.

You must log in to answer this question.