Giter Site home page Giter Site logo

win32-openssh's Introduction

win32-openssh's People

Contributors

arif-pragmasys avatar bagajjal avatar bingbing8 avatar dependabot[bot] avatar dkulwin avatar dzampino avatar jsoref avatar lupo1977 avatar maertendmsft avatar manojampalam avatar mikemaccana avatar quamrulmina avatar rayhayes avatar sitiom avatar stevel-msft avatar szepeviktor avatar tgauth avatar vthiebaut10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

win32-openssh's Issues

Creating a chocholatey package for this may increase participation

Props to the PoweShell team on implementing SSH support for Windows. Following the steps to deploy Win32-OpenSSH was pretty painless however it did require a bit of extra time. Time which could have been saved if there were a chocholatey package available to automate the deployment. I can't guarantee that I would have enough time to set aside to contribute to creating a such package but if there is enough interest this seems like an easy one to create and If time allows I would like to do what I can to make it happen.

Support shortcuts on cmd

Hello,

in a ssh session in powershell i can use shortcuts like "ctrl + a" and "ctrl + e"
with ssh in cmd i can't use this shortcuts

thanks

Can't open/find private key file

I'm having trouble connecting to a server using public key authentication. OpenSSH on the client computer seems to have a problem finding the private key file. I am able to use the private key file with WinSCP and it works fine.

Below is the directory listing, ssh command, and debug output. Note the 6th debug1: statement. From what I understand, it's saying it can't find my private key, even though the file name and path are correct (see directory listing). I've tried various types of permissions on the private key file and nothing seems to work. Am I doing something wrong?

 Volume in drive C has no label.
 Volume Serial Number is D29F-A36F

 Directory of C:\openssh

12/13/2015  10:45 AM    <DIR>          .
12/13/2015  10:45 AM    <DIR>          ..
12/12/2015  09:20 AM             1,476 prv_key.ppk
11/09/2015  10:17 PM               310 setup-ssh-lsa.cmd
11/09/2015  10:19 PM           699,329 sftp-server.exe
11/09/2015  10:19 PM           776,732 sftp.exe
11/09/2015  10:18 PM         3,165,996 ssh-keygen.exe
11/09/2015  10:18 PM         4,269,803 ssh.exe
11/09/2015  10:18 PM         4,547,092 sshd.exe
11/09/2015  10:17 PM             3,553 sshd_config
12/13/2015  10:31 AM    <DIR>          x64
12/13/2015  10:31 AM    <DIR>          x86
               8 File(s)     13,464,291 bytes
               4 Dir(s)  391,602,634,752 bytes free

C:\openssh>ssh [email protected] -p 1000 -L 2000:192.168.254.120:80 -N -i c:\openssh\prv_key.ppk -v
OpenSSH_7.1p1 Microsoft Win32 port, OpenSSL 1.0.2d 9 Jul 2015
debug1: Connecting to server.net [75.87.138.43] port 1000.
debug1: allocating new sfd, sfd [3] fd [3] handle [440] type [2]
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: allocating new sfd, sfd [4] fd [4] handle [448] type [1]
debug1: key_load_public: No such file or directory
debug1: identity file c:\openssh\prv_key.ppk type -1
debug1: _open() returned error, errno [2]
debug1: key_load_public: No such file or directory
debug1: identity file c:\openssh\prv_key.ppk-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1p1 Microsoft Win32 port Nov  9 2015
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.1
debug1: match: OpenSSH_7.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to server.net:1000 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client [email protected] <implicit> none
debug1: kex: client->server [email protected] <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:[removed]
debug1: Host '[server.net]:1000' is known and matches the ECDSA host key.
debug1: Found key in C:\Users\me\.ssh\known_hosts:1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: c:\openssh\prv_key.ppk
debug1: allocating new sfd, sfd [4] fd [4] handle [460] type [1]
Enter passphrase for key 'c:\openssh\prv_key.ppk':
debug1: allocating new sfd, sfd [4] fd [4] handle [460] type [1]
Enter passphrase for key 'c:\openssh\prv_key.ppk':
debug1: allocating new sfd, sfd [4] fd [4] handle [460] type [1]
Enter passphrase for key 'c:\openssh\prv_key.ppk':
debug1: allocating new sfd, sfd [4] fd [4] handle [460] type [1]
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).```

ssh from a linux to windows

Tried ssh from a linux (ubuntu) to the windows server that has the openssh-win32 running, found that it only works if I specify the local admin user of that machine, but not working if specify a domain user. On the windows client, both local user and domain user works.

ctrl+c exits client instead of being sent to server

While ctrl+c does not exit the client while it's prompting for a password upon connection (#5), once the connection is complete, ctrl+c is processed by the client (terminating it) instead of being sent to the server. This behavior is not consistent with the other SSH clients I've used on Windows (such as the Cygwin one).

Strange output formatting when ssh'ing into server

Hi,

I've just tested the release code... Login went smoothly, but when I type "ll" for a Long Directory listing, I get something like this:
JoLuServer.selfhost.me> dir
dir
drwx------ 6 root root 4096 Oct 5 14:01 �[1;34m.�[0m
drwxr-xr-x 26 root root 4096 Oct 26 07:31 �[1;34m..�[0m
-rw------- 1 root root 16 Jul 2 07:33 �[0;0m.esd_auth�[0m
drwx------ 2 root root 4096 Sep 8 07:31 �[1;34m.gnupg�[0m
drwxr-xr-x 3 root root 4096 Oct 5 14:01 �[1;34m.local�[0m
-rw-r--r-- 1 root root 364 Mar 12 2015 �[0;0m.profile�[0m
drwx------ 2 root root 4096 Oct 26 07:32 �[1;34m.pulse�[0m
-rw------- 1 root root 256 Jul 2 07:33 �[0;0m.pulse-cookie�[0m
drwxr-xr-x 2 root root 4096 May 19 2014 �[1;34m.ssh�[0m

which looks like some kind of encoding issue...

Legacy key exchange

Hello guys,

i tried to use your pre release ssh client to connect to a Cisco AIR-AP1242AG-E-K9 (newest available Firmware) but i get a error message because of not supported key exchange

Unable to negotiate with XXX.XXX.XXX.XXX: no matching key exchange method found. T
heir offer: diffie-hellman-group1-sha1

Could you support legacy key exchanges to support "older" hardware?

Thanks in advance

Add support for GSSAPIKeyExchange

The currently published code supports GSSAPIAuthentication, but not GSSAPIKeyExchange. It would be very useful to have this support. Most modern Linux distros support this option, and given the Kerberos integration with AD, it seems to make sense for a Windows port to have this feature.

https://github.com/SimonWilkinson/gss-openssh/ contains the base code for most of the Linux patches.

SSHD: the output of some command is empty

For instance, the following command

$ ssh someuser@somehost cmd.exe /C dir

outputs emty result.

The debug log of SSHD:

debug1: Executing command: cmd.exe /C dir
debug1: Received SIGCHLD.
debug1: session_by_pid: pid 464
debug1: session_exit_message: session 0 channel 0 pid 464
debug1: session_exit_message: release channel 0
debug1: read from socket sfd [9] failed with error code [10054]
debug1: read from socket sfd [3] failed with error code [10035]
debug1: read from socket sfd [7] failed with error code [10054]
debug1: session_by_channel: session 0 channel 0
debug1: session_close_by_channel: channel 0 child 0
debug1: session_close: session 0 pid 0
debug1: channel 0: free: server-session, nchannels 1
WaitForSingleObject in thread [0] failed with error code [298]

Configure script error in Cygwin reference environment.

I am able to successfully build dkulwin's November 5th commit (65fb8f4...)

I have not been able to build arif-pragmasys's commit from later that day (71cca6e...), nor can I build any subsequent commit.

I currently get the following error when I run OpenSSH's ./configure script:
./configure: line 6068: syntax error near unexpected token -Wl,-z,relro' ./configure: line 6068: OSSH_CHECK_LDFLAG_LINK(-Wl,-z,relro)'

Additional Info:
I am using the reference versions defined in this wiki's build guide. https://github.com/PowerShell/Win32-OpenSSH/wiki/OpenSSH-32-bit-Build-and-Installation-Instructions

I built my reference installation using the Cygwin time machine, 32-bit, circa 2013-11-12. See the following links for more info.
http://www.fruitbat.org/Cygwin/index.html
ftp://www.fruitbat.org/pub/cygwin/circa/index.html
ftp://www.fruitbat.org/pub/cygwin/circa/2013/11/12/103606/
ftp://www.fruitbat.org/pub/cygwin/circa/2013/11/12/103606/index.html

I have also attached my build script. (Rename from .txt -> .sh before running in Cygwin)
Note: The script assumes the existence of a root build directory named "C:\Builds\PowerShell-Win32-OpenSSH", you will need to modify the script as needed for your environment.

Build32and64.txt

man page views

Hello,

Is anyone else having problems viewing man pages with just man ls for example?

I see:

jungle@host[18:06] ~ % man ls
--More--(byte 2508)

No contents of the manual entry actually appear for the desired page.

My normal shell is zsh but I have also changed to sh with the same results.

Thanks!

SSHD: Post-connection problems with output

Currently working with ConnectBot as it is the client with the least amount of issues when connecting to SSHD (running on Windows 8.1). Here's what I've noticed so far:

  1. cls command works in cmd, but not in PowerShell
  2. Some commands in Powershell display output and others do not (this seems to vary depending on the cursor position)
  3. Commands with multi-line output (whoami /all, help) display correctly in cmd.exe. Commands with single line output (whoami) display output on the previous line, replacing the prompt.
  4. Running Powershell with the -PSConsoleFile or -File .\path\to\profile_script.ps1 does not load console or profile files.
  5. Up/down arrows do not scroll backwards/forwards through history in either cmd.exe or Powershell.exe.

Launching PowerShell yields an inoperable console

Entering the SSH session via PuTTy drops you at cmd as expected (Server 2012 R2 host). When you run 'PowerShell.exe', it launches within the session, but commands such as 'dir' fail to produce any output.

can't use openssh in combination with mercurial - ioctlsocket error

When I connect manually to the mercurial server, I don't get any errors:

C:\home>C:\OpenSSH-Win32\ssh.exe -v -oStrictHostKeyChecking=no -oKexAlgorithms=+
diffie-hellman-group1-sha1 -oPasswordAuthentication=no -oKbdInteractiveAuthentic
ation=no -oChallengeResponseAuthentication=no -i C:\home\shellscript\puppet_id_r
sa [email protected] -p2222
OpenSSH_7.1p1 Microsoft Win32 port, OpenSSL 1.0.2d 9 Jul 2015
debug1: Connecting to x.x.x [x.x.x.x] port 2222.
debug1: allocating new sfd, sfd [3] fd [3] handle [1880] type [2]
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: allocating new sfd, sfd [4] fd [4] handle [1804] type [1]
debug1: key_load_public: No such file or directory
debug1: identity file C:\home\shellscript\puppet_id_rsa type -1
debug1: _open() returned error, errno [2]
debug1: key_load_public: No such file or directory
debug1: identity file C:\home\shellscript\puppet_id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1p1 Microsoft Win32 port Nov 9 2015
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1 Debian-5
debug1: match: OpenSSH_6.7p1 Debian-5 pat OpenSSH* compat 0x04000000
debug1: Authenticating to rcs-serv.proxi.tools:2222 as 'phabricator-vcs'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client [email protected] none
debug1: kex: client->server [email protected] none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:...
debug1: Host '[x.x.x.x]:2222' is known and matches the ECDSA host key.
debug1: Found key in C:\Documents and Settings\Administrator.ssh\known_hosts:2
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: C:\home\shellscript\puppet_id_rsa
debug1: allocating new sfd, sfd [4] fd [4] handle [1792] type [1]
debug1: Authentication succeeded (publickey).
Authenticated to rcs-serv.proxi.tools ([5.39.40.247]:2222).
debug1: allocating new sfd, sfd [4] fd [4] handle [15] type [4]
debug1: allocating new sfd, sfd [5] fd [5] handle [19] type [4]
debug1: allocating new sfd, sfd [6] fd [6] handle [23] type [4]
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: Remote: Forced command.
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
PTY allocation request failed on channel 0
phabricator-ssh-exec: Welcome to Phabricator.
...

When I use ssh in combination with mercurial, I get ioctlsocket errors and the connection times out:

C:\home>hg.exe clone ssh://[email protected]:2222/diffusion/COMMON/common-files/ c:\home\shellscript\common --ssh "ssh -v -oStrictHostKeyChecking=no -oPasswordAuthentication=no -oKbdInteractiveAuthentication=no -oChallengeResponseAuthentication=no -i c:\home\shellscript\puppet_id_rsa"
remote: OpenSSH_7.1p1 Microsoft Win32 port, OpenSSL 1.0.2d 9 Jul 2015
remote: debug1: Connecting to x.x.x.x [x.x.x.x] port 2222.
remote: debug1: allocating new sfd, sfd [3] fd [3] handle [1860] type [2]
remote: debug1: Connection established.
remote: debug1: permanently_set_uid: 0/0
remote: debug1: allocating new sfd, sfd [4] fd [4] handle [1800] type [1]
remote: debug1: key_load_public: No such file or directory
remote: debug1: identity file c:\home\shellscript\puppet_id_rsa type -1
remote: debug1: _open() returned error, errno [2]
remote: debug1: key_load_public: No such file or directory
remote: debug1: identity file c:\home\shellscript\puppet_id_rsa-cert type -1
remote: debug1: Enabling compatibility mode for protocol 2.0
remote: debug1: Local version string SSH-2.0-OpenSSH_7.1p1 Microsoft Win32 port Nov 9 2015
remote: debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1 Debian-5
remote: debug1: match: OpenSSH_6.7p1 Debian-5 pat OpenSSH* compat 0x04000000
remote: debug1: Authenticating to x.x.x.x:2222 as 'phabricator-vcs'
remote: debug1: SSH2_MSG_KEXINIT sent
remote: debug1: SSH2_MSG_KEXINIT received
remote: debug1: kex: server->client [email protected] none
remote: debug1: kex: client->server [email protected] none
remote: debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
remote: debug1: Server host key: ecdsa-sha2-nistp256 SHA256:...
remote: debug1: Host '[x.x.x.x]:2222' is known and matches the ECDSA host key.
remote: debug1: Found key in C:\Documents and Settings\Administrator.ssh\known_hosts:2
remote: debug1: SSH2_MSG_NEWKEYS sent
remote: debug1: expecting SSH2_MSG_NEWKEYS
remote: debug1: SSH2_MSG_NEWKEYS received
remote: debug1: Roaming not allowed by server
remote: debug1: SSH2_MSG_SERVICE_REQUEST sent
remote: debug1: SSH2_MSG_SERVICE_ACCEPT received
remote: debug1: Authentications that can continue: publickey,keyboard-interactive
remote: debug1: Next authentication method: publickey
remote: debug1: Trying private key: c:\home\shellscript\puppet_id_rsa
remote: debug1: allocating new sfd, sfd [4] fd [4] handle [1788] type [1]
remote: debug1: Authentication succeeded (publickey).
remote: Authenticated to x.x.x.x ([x.x.x.x]:2222).
remote: debug1: allocating new sfd, sfd [4] fd [4] handle [1788] type [3]
remote: debug1: allocating new sfd, sfd [5] fd [5] handle [1784] type [3]
remote: debug1: allocating new sfd, sfd [6] fd [6] handle [1780] type [3]
remote: debug1: ioctlsocket() returned error, errno [10038]
remote: debug1: ioctlsocket() returned error, errno [10038]
remote: debug1: ioctlsocket() returned error, errno [10038]
remote: debug1: channel 0: new [client-session]
remote: debug1: Requesting [email protected]
remote: debug1: Entering interactive session.
remote: debug1: Remote: Forced command.
remote: debug1: Remote: Port forwarding disabled.
remote: debug1: Remote: X11 forwarding disabled.
remote: debug1: Remote: Agent forwarding disabled.
remote: debug1: Remote: Pty allocation disabled.
remote: debug1: Sending command: hg -R diffusion/COMMON/common-files/ serve --stdio

Any idea what could be the problem?

server identification string unhelpfully generic

One thing PuTTY does is that when SSH servers have known bugs (eg. #48) PuTTY will implement workarounds based on the server identifier as elaborated at http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter4.html#config-ssh-bugs . But the server identifier in this case is too generic for that to work. It's SSH-2.0-OpenSSH_7.1. You don't know if the server is running Linux or Windows from that. With versions of ssh installed via apt-get on Debian you get SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu7.1 as the identification string. Maybe ya'll could do that for this one. eg. SSH-2.0-OpenSSH_7.1PSbuildx or something.

Wrong user profile folder created on first logon through ssh

Repro steps:

  • Create a new user account
    net user newuser newuserpassword /add
  • Create a remote session as new user
  • User is logged on and directed to the following directory

    while its expected that the following directory be created instead
    \newuser

sshd.exe needs to be able to run as Network Service

Currently sshd.exe needs to run as Local System. Otherwise remote sessions break abruptly during authentication. This happens even when run as "admin". Need to investigate the dependency on System as eventually we would like the deamon to run in a less privileged mode.

file names are not represented correctly in SFTP subsystem

I installed this on my local machine and then SSH'd into it. I initialized the SFTP subsystem and then tried to get the canonicalized absolute pathname for the current working directory (.) by sending a SSH_FXP_REALPATH packet. I got C:/Users/My Username back. This path is malformed per the SFTP specs. Quoting http://tools.ietf.org/html/draft-ietf-secsh-filexfer-02#section-6.2 ,

   This protocol represents file names as strings.  File names are
   assumed to use the slash ('/') character as a directory separator.

   File names starting with a slash are "absolute", and are relative to
   the root of the file system.  Names starting with any other character
   are relative to the user's default directory (home directory).  Note
   that identifying the user is assumed to take place outside of this
   protocol.

C:/Users/My Username does not start with a slash and so it is not, per the SFTP specs, absolute to the root of the file system.

Among other problems this causes is that WinSCP can't open up any subdirectory in the C:/Users/My Username directory.

Here's a copy of the SFTP logs:

-> NET_SFTP_INIT (0.0002s)
00000000  00:00:00:03                                      ....

<- NET_SFTP_VERSION (0.0118s)
00000000  00:00:00:03:00:00:00:18:70:6f:73:69:78:2d:72:65  ........posix-re
00000010  6e:61:6d:65:40:6f:70:65:6e:73:73:68:2e:63:6f:6d  [email protected]
00000020  00:00:00:01:31:00:00:00:13:73:74:61:74:76:66:73  ....1....statvfs
00000030  40:6f:70:65:6e:73:73:68:2e:63:6f:6d:00:00:00:01  @openssh.com....
00000040  32:00:00:00:14:66:73:74:61:74:76:66:73:40:6f:70  2....fstatvfs@op
00000050  65:6e:73:73:68:2e:63:6f:6d:00:00:00:01:32:00:00  enssh.com....2..
00000060  00:14:68:61:72:64:6c:69:6e:6b:40:6f:70:65:6e:73  ..hardlink@opens
00000070  73:68:2e:63:6f:6d:00:00:00:01:31:00:00:00:11:66  sh.com....1....f
00000080  73:79:6e:63:40:6f:70:65:6e:73:73:68:2e:63:6f:6d  [email protected]
00000090  00:00:00:01:31                                   ....1

-> NET_SFTP_REALPATH (0.0001s)
00000000  00:00:00:01:2e                                   .....

<- NET_SFTP_NAME (0.0006s)
00000000  00:00:00:01:00:00:00:14:43:3a:2f:55:73:65:72:73  ........C:/Users
00000010  2f:4d:79:20:55:73:65:72:6e:61:6d:65:00:00:00:14  /My Username....
00000020  43:3a:2f:55:73:65:72:73:2f:4d:79:20:55:73:65:72  C:/Users/My User
00000030  6e:61:6d:65:00:00:00:00                          name....

Maybe what ya'll could do is return something like /C/Users/My Username or something.

RSA keys in the repo

Unable to start sshd service

When using 'net start sshd' to start the service (in an elevated cmd window), I get the following error:

PS C:\Users\user\Documents\WindowsPowerShell\Modules\OpenSSH-Win32> net start sshd
The SSHD service is starting.
The SSHD service could not be started.

A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

Clear command isn't work.

When I write "clear" I have incorrect behavior.
root@localhost:# clear
clear
←[H←[2Jroot@localhost:
#

Write failed: Broken pipe

[wind@JaxPC .ssh]$ ssh [email protected]

Microsoft Windows [°æ±¾ 6.1.7601]
°æȨËùÓÐ (c) 2009 Microsoft Corporation¡£±£ÁôËùÓÐȨÀû¡£

administrator@MHK-229 C:\Users\Administrator>exit
Connection to 192.168.2.151 closed.
[wind@JaxPC .ssh]$ scp a.txt [email protected]:a.txt
Write failed: Broken pipe
lost connection
[wind@JaxPC .ssh]$

How can I solve this problem?
thanks

Server refused public-key signature despite accepting key!

I followed the instructions to install OpenSSH on my 64bit Windows Server 2012 R2 server.
The server appears to be running properly.
I can SSH to it remotely using an ssh client such as Putty to gain access using USER@DOMAIN and my network password! Yay!
I followed your instruction on how to create a key. Now I'm trying to configure public-key access and I'm getting the error "Server refused public-key signature despite accepting key!"
I made sure that these settings are NOT commented out in my sshd_config file:
RSAAuthentication yes
PubkeyAuthentication yes

I tried on the local server itself to see if it made a diff. Same results.

C:\Users\GIONETJE.ssh>ssh.exe -i id_rsa -l gionetje@MYDOMAIN localhost -v
OpenSSH_7.1p1 Microsoft Win32 port, OpenSSL 1.0.2d 9 Jul 2015
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: allocating new sfd, sfd [3] fd [3] handle [496] type [2]
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: allocating new sfd, sfd [4] fd [4] handle [504] type [1]
debug1: identity file id_rsa type 1
debug1: _open() returned error, errno [2]
debug1: key_load_public: No such file or directory
debug1: identity file id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1p1 Microsoft Win32 port Nov 9 2
015
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.1
debug1: match: OpenSSH_7.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to localhost:22 as 'gionetje@MYDOMAIN'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client [email protected] none
debug1: kex: client->server [email protected] none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:AtcTexTZXuc2egtmU7s9lShjLwYD
lKgQ68wiVNXL4UA
debug1: Host 'localhost' is known and matches the ECDSA host key.
debug1: Found key in C:\Users\GIONETJE.ssh\known_hosts:1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interacti
ve
debug1: Next authentication method: publickey
debug1: Offering RSA public key: id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: allocating new sfd, sfd [4] fd [4] handle [504] type [1]
debug1: Authentications that can continue: publickey,password,keyboard-interacti
ve
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interacti
ve
debug1: Next authentication method: password
gionetje@ontario@localhost's password:

Any ideas? Am I missing something?
Thanks

Error running setup-ssh-lsa.cmd

I have a systems running Windows 2012 R2. When i try to run "setup-ssh-lsa.cmd" I received an error about the script not being able to find a file. I was able to fix this by running "copy "C:\Program Files\OpenSSH-Win32\x64\ssh-lsa.dll" "C:\Windows\system32"". I know that this is a hack, but what the hell, it worked. I checked and the Reg key was created, so, all should be good. Well, not so much. When i try to start ssh outside the directory where the binary is, it get an error, when i change into the directory i get a different error, finally if i call it using what i call "Linux style", it works. Example below:

PS C:> ssh
ssh : The term 'ssh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:1

  • ssh
  • - CategoryInfo          : ObjectNotFound: (ssh:String) [], CommandNotFoundException
    - FullyQualifiedErrorId : CommandNotFoundException
    
    

PS C:> cd 'C:\Program Files\OpenSSH-Win32'
PS C:\Program Files\OpenSSH-Win32> ssh
ssh : The term 'ssh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:1

  • ssh
  • - CategoryInfo          : ObjectNotFound: (ssh:String) [], CommandNotFoundException
    - FullyQualifiedErrorId : CommandNotFoundException
    
    

Suggestion [3,General]: The command ssh was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If yo
u trust this command, instead type ".\ssh". See "get-help about_Command_Precedence" for more details.

PS C:\Program Files\OpenSSH-Win32> .\ssh.exe
usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-E log_file] [-e escape_char]
[-F configfile] [-I pkcs11] [-i identity_file]
[-L address] [-l login_name] [-m mac_spec]
[-O ctl_cmd] [-o option] [-p port]
[-Q cipher | cipher-auth | mac | kex | key]
[-R address] [-S ctl_path] [-W host:port]
[-w local_tun[:remote_tun]] [user@]hostname [command]

I was able to install and get the expected behavior on my Windows 2008 R2 box. Is this a Windows 2012 issue? It is almost as if the .DLL is not registering the path of the application correctly.

ssh.exe Error opening terminal

Connection to a linux remote host works fine, but I can open any graphical programm. Neither from cmd.exe nor powershell

user@host:~$ htop
htop
Error opening terminal: unknown.
user@host:~$ nano
nano
Error opening terminal: unknown.
user@host:~$

SSH'ed into Ubuntu machine on Azure got "TERM environment variable not set"

SSH'ed into Ubuntu machine on Azure got "TERM environment variable not set" when running top.

This works fine, of course, with other SSH clients. TERM is set to dumb right now. I exported TERM to xterm and it worked a little, but I can't ctrl-c out of top or htop, and htop has considerable visual corruption.

not able to start sshd.exe

I've tried and it works. However when I generate the host key and use passphrase - after this sshd is not able to load (or run).

ssh.exe fails if ~/.ssh/config exists

Greetings,

First, thank you for doing this port.

If you have a config file in your .ssh directory, ssh.exe will fail with the following message;
fstat C:\Users\foo/.ssh/config: The operation completed successfully.

To ensure that the problem was not caused by the contents of my config file I tried it with an empty file which failed with the above output, a mininal version that just contained my user name definition which also failed with the same output, and my normal config using the -F (config file option) which worked correctly.

I am using the 11_09_2015 build on a 32bit Windows 10 Home tablet with all of the latest patches.

Domain accounts do not works with key based authentication

I'm getting these messages on the server (using debug mode) when trying to log in using public key authentication. I have tried both rsa as dsa keys. Both are placed in .ssh\authorized_keys in my profile directory. Password auth is working.
Should this entry in sshd_config be in Windows format? "AuthorizedKeysFile .ssh/authorized_keys"

Wishlist: SSH Agent in the desktop session

OpenSSH comes with a program called ssh-agent which can be launched on a POSIX system to store any client RSA keys and their associated unlock passwords (if required to unlock the keys) in memory for ease of reuse in successive connections from the workstation. The equivalent in the Windows world thus-far has been PuTTY's Pageant program.

The desire would be to have an agent equivalent which the ssh client may utilise to provide unlocked keys for authentication to remote systems when supported instead of passwords. This agent should start at login to Windows and be accessible from any program that may be run within the desktop session.

The OpenSSH ssh-agent returns BASH-compatible environment variable setting commands via STDOUT when run which are normally passed into BASH's eval function to set these variables into the session for any child processes to utilise - in Windows this is a problem even when we have BASH from Cygwin or some other source as the environment variables only get set in the process that defines them and children of that process. To be fully compatible with Windows the ssh-agent equivalent should set these environment variables into the Windows session itself to allow any program within that session to discover the agent until logout.

sftp external drive

I have setup a sftp subsystem with ssh and winscp client. Access to C: is not a problem, however other drives do not appear despite access with admin user.
My suspicion is that the underlying unix<->windows file system mapping only mounts C:

Is this correct and how do I fix this?

Interactive commands not supported

Repro steps:

  • Open a remote ssh session (from windows client to windows server)
  • do net use \share /u:user
  • type password but ssh never returns

Access via ssh/sftp from ubuntu

Things that I got to work:

  • access windows directory via sftp from WinSCP
  • access windows machine from ubuntu via SSH and run windows commands like dir.

What I don't get to work though:

  1. form ubuntu machine (I tried a fuew endings)
rsync srcfile [email protected]:c:/
  1. Open from Nautilius the Windows remote directory by using "sftp://[email protected]"

sudo password in plain text

Hello Microsoft,

I found it funny that you want to hide yes for this prompt:
Are you sure you want to continue connecting (yes/no)? ***

But it's definitely wrong to print the sudo password in plain text:
sudo -v
sudo -v←[?2004l
Password:microsoft

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.