ssh command not work in cygwin
the ssh command is work perfect in my cygwin before. but today it is not work. It always show a usgage. but my command is correct.
$ ssh [email protected]
usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-e escape_char] [-F configfile]
[-I pkcs11] [-i identity_file]
[-L [bind_address:]port:host:hostport]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-R [bind_address:]port:host:hostport] [-S ctl_path]
[-W host:port] [-w local_tun[:remote_tun]]
[user@]hostname [command]
$ ssh -V
OpenSSH_5.6p1, OpenSSL 0.9.8o 01 Jun 2010
cygwin version is 1.7
Thants
I had this problem and was able to resolve it by downgrading my openssh to "OpenSSH_5.5p1, OpenSSL 0.9.8o 01 Jun 2010"
Just open the cygwin setup program and type ssh, then click the version until you see 5.5p1.
In order to get Cygwin to use ssh you must install it with ssh (networking) included. When you get to the dialog where the options to check stuff to install or not appears, type "network" in the search box and look for ssh. You need to select this option for it to be installed.
You will find many basic features need this to be installed.
I ran into this just today after using Cygwin primarily for ssh for several years. Turns out that as of a year ago there is an ssh client built into Windows 10. As of the April 2018 Windows 10 update, it is installed and enabled by default.
Just drop into your command line and type your ssh command.
On cygwin, try type ssh
. If the result is a path like /cygdricve/c/Windows/System32/OpenSSH/ssh
you might want to try to use (again) cygwins ssh.exe, by calling "/bin/ssh.exe ... ", or put this as ALIAS in your .bashrc:
alias ssh="/bin/ssh.exe"