Subject: Re: Authentication on user request

Re: Authentication on user request

From: Peter Stuge <>
Date: Thu, 19 Aug 2010 22:20:37 +0200

Paresh Thakor wrote:
> what I want is to open a channel for user who is not authenticated.

You can not do that, it is not how SSH works. Did you read the RFC
to learn about the protocol that your application wants to use?

> Like, terminal will open and ask user for password authentication.

User auth happens before channels. As Ted pointed out, your program
must be able to deal with whatever userauth methods are allowed by
the server, and your program must interact with the user accordingly.

How you do that is your problem. Do what fits in your app.

> I want such functionality. If user has not specified password,
> it'll be asked when he opens terminal. Can anyone suggest me any
> idea? How can I implement it?

You are on your own. This is outside the scope of libssh2. You have
to learn how to develop your own application. I keep repeating this,
because you keep asking this mailing list about questions which are
unrelated to libssh2.

> Without authentication, user needs to be able to open terminal and
> on terminal he'll input password, which will be used for
> authentication. This way, user keeps password security.

Please don't mistake passwords for security.

Received on 2010-08-19