{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/Win32-OpenSSH/issues/1148","repository_url":"https://api.github.com/repos/PowerShell/Win32-OpenSSH","labels_url":"https://api.github.com/repos/PowerShell/Win32-OpenSSH/issues/1148/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/Win32-OpenSSH/issues/1148/comments","events_url":"https://api.github.com/repos/PowerShell/Win32-OpenSSH/issues/1148/events","html_url":"https://github.com/PowerShell/Win32-OpenSSH/issues/1148","id":321471916,"number":1148,"title":"Limit OpenSSH only to SFTP doesn't work - ForceCommand internal-sftp","user":{"login":"jirijanata","id":14040091,"avatar_url":"https://avatars1.githubusercontent.com/u/14040091?v=4","gravatar_id":"","url":"https://api.github.com/users/jirijanata","html_url":"https://github.com/jirijanata","followers_url":"https://api.github.com/users/jirijanata/followers","following_url":"https://api.github.com/users/jirijanata/following{/other_user}","gists_url":"https://api.github.com/users/jirijanata/gists{/gist_id}","starred_url":"https://api.github.com/users/jirijanata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirijanata/subscriptions","organizations_url":"https://api.github.com/users/jirijanata/orgs","repos_url":"https://api.github.com/users/jirijanata/repos","events_url":"https://api.github.com/users/jirijanata/events{/privacy}","received_events_url":"https://api.github.com/users/jirijanata/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"bagajjal","id":23668037,"avatar_url":"https://avatars0.githubusercontent.com/u/23668037?v=4","gravatar_id":"","url":"https://api.github.com/users/bagajjal","html_url":"https://github.com/bagajjal","followers_url":"https://api.github.com/users/bagajjal/followers","following_url":"https://api.github.com/users/bagajjal/following{/other_user}","gists_url":"https://api.github.com/users/bagajjal/gists{/gist_id}","starred_url":"https://api.github.com/users/bagajjal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bagajjal/subscriptions","organizations_url":"https://api.github.com/users/bagajjal/orgs","repos_url":"https://api.github.com/users/bagajjal/repos","events_url":"https://api.github.com/users/bagajjal/events{/privacy}","received_events_url":"https://api.github.com/users/bagajjal/received_events","type":"User","site_admin":false},"assignees":[{"login":"bagajjal","id":23668037,"avatar_url":"https://avatars0.githubusercontent.com/u/23668037?v=4","gravatar_id":"","url":"https://api.github.com/users/bagajjal","html_url":"https://github.com/bagajjal","followers_url":"https://api.github.com/users/bagajjal/followers","following_url":"https://api.github.com/users/bagajjal/following{/other_user}","gists_url":"https://api.github.com/users/bagajjal/gists{/gist_id}","starred_url":"https://api.github.com/users/bagajjal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bagajjal/subscriptions","organizations_url":"https://api.github.com/users/bagajjal/orgs","repos_url":"https://api.github.com/users/bagajjal/repos","events_url":"https://api.github.com/users/bagajjal/events{/privacy}","received_events_url":"https://api.github.com/users/bagajjal/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-05-09T08:10:10Z","updated_at":"2018-05-10T17:54:26Z","closed_at":null,"author_association":"NONE","body":"**\"OpenSSH for Windows\" version**\r\nv7.6.1.0p1-Beta\r\n \r\n**Server OperatingSystem**\r\nWindows Server 2012 R2 Datacenter\r\n\r\n**Client OperatingSystem**\r\nWindows 8.1, WinSCP\r\n\r\n**What is failing**\r\nAccording to this article- https://www.digitalocean.com/community/tutorials/how-to-enable-sftp-without-shell-access-on-ubuntu-16-04 this command `ForceCommand internal-sftp` should dissallow SSH access and allows only SFTP. But it doesn't seems to work. It makes nothing.. I tried different commands and there is result:\r\n\r\n**Working commands**\r\n`ForceCommand cmd /c dir`\r\n\r\n**Not working commands**\r\n``ForceCommand internal-sftp``\r\n`ForceCommand sftp`\r\n`ForceCommand sftp-server.exe`\r\n\r\nHave a nice day :)\r\nOffTopic\r\nWas anyone able to find workaround for not working chroot (Virtual Directories emulation etc.)?"},"comment":{"url":"https://api.github.com/repos/PowerShell/Win32-OpenSSH/issues/comments/388132407","html_url":"https://github.com/PowerShell/Win32-OpenSSH/issues/1148#issuecomment-388132407","issue_url":"https://api.github.com/repos/PowerShell/Win32-OpenSSH/issues/1148","id":388132407,"user":{"login":"jirijanata","id":14040091,"avatar_url":"https://avatars1.githubusercontent.com/u/14040091?v=4","gravatar_id":"","url":"https://api.github.com/users/jirijanata","html_url":"https://github.com/jirijanata","followers_url":"https://api.github.com/users/jirijanata/followers","following_url":"https://api.github.com/users/jirijanata/following{/other_user}","gists_url":"https://api.github.com/users/jirijanata/gists{/gist_id}","starred_url":"https://api.github.com/users/jirijanata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirijanata/subscriptions","organizations_url":"https://api.github.com/users/jirijanata/orgs","repos_url":"https://api.github.com/users/jirijanata/repos","events_url":"https://api.github.com/users/jirijanata/events{/privacy}","received_events_url":"https://api.github.com/users/jirijanata/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T17:54:26Z","updated_at":"2018-05-10T17:54:26Z","author_association":"NONE","body":"Hi,\r\n\r\nthank you very much for your answer. I'm attaching log and my config file. It looks, that ForceCommand is processing, but I'm still logged in and I'm not getting any deny message.\r\n[sshd_testssh_domain.log](https://github.com/PowerShell/Win32-OpenSSH/files/1992680/sshd_testssh_domain.log)\r\n[sshd_config.txt](https://github.com/PowerShell/Win32-OpenSSH/files/1992707/sshd_config.txt)\r\n\r\nMaybe some other bug (but I'll report it in another issue) - if I open ssh session just like TestSSH user (not TestSSH@doma.local), I'm able to log in, but no match is found in config file. This is just domain joined machine and there is no local TestSSH user. So there is maybe some bug in looking for domain/local users. \r\n\r\nThank you for information about chroot :) it looks promising.\r\n"}}
{"actor":{"display_login":"jirijanata"}}