Exception when using KeyboardInteractiveAuthenticationMethod if account have no access to shell
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 993
- Avg merge
- 9d 21h
- Merged PRs (30d)
- 1
Description
I'm trying to use one of my servers as Socks5 proxy, for this purpose i've created special user with disabled shell access(default shell /sbin/nologin). On connect i got this error:
Message:
"String reference not set to an instance of a String. (Parameter 's')"
Stack trace:
" in Renci.SshNet.KeyboardInteractiveAuthenticationMethod.Authenticate(Session session)\n in Renci.SshNet.AuthenticationMethod.Renci.SshNet.IAuthenticationMethod.Authenticate(ISession session)\n in Renci.SshNet.ClientAuthentication.TryAuthenticate(ISession session, AuthenticationState authenticationState, String[] allowedAuthenticationMethods, SshAuthenticationException& authenticationException)\n in Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)\n in Renci.SshNet.ConnectionInfo.Authenticate(ISession session, IServiceFactory serviceFactory)\n in Renci.SshNet.Session.Connect()\n в Renci.SshNet.BaseClient.Connect()\n в test.TargetService.d__12.MoveNext() "
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Renci.SshNet.KeyboardInteractiveAuthenticationMethod.Authenticate, using the provided stack trace and the nologin account scenario to reproduce the failure. Determine how authentication behaves when the account has no shell access; done means the scenario no longer produces the reported String-parameter exception and its resulting behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100