Subject: Add entry in known host file

Add entry in known host file

From: Kishore Av <>
Date: Wed, 26 Aug 2015 11:41:46 +0530

If I'm trying to connect server at first time, no entry is availed in
.ssh/known-hosts file.
Using checkp method, i got info about NOTFOUND.
I used knownhost addc method and writefile method to add new entry of
server key.
But it's seems, my understanding might be wrong.
How can i get host key of new server and add it in .ssh/known-hosts file???

Thanks in Advance
On 09-Aug-2015 12:38 am, "Peter Stuge" <> wrote:

> Kishore Av wrote:
> > I using libssh2_channel_request_pty tried with asci, vanilla, vt-100
> > terminal types.
> Then your software must also implement correct and complete terminal
> emulation for the type you request.
> > After writing the data, I used looping to read data
> Terminals aren't so simple, and a pty channel will be running a shell
> intended for communication with humans and not with a program such as
> yours.
> It is extremely fragile and error-prone to try to automate anything
> around an interactive shell. Use a dedicated server-side process and
> protocol instead.
> > actual data size is 68kb, but it reads 10240 bytes.
> Can you verify that this happens also by modifying the example/ssh2.c
> program in the libssh2 source tree?
> > For some commands, I'm not getting any read response as i getting
> > when i execute manually.
> When you execute "manually" the terminal emulation code path is
> *significantly* different, that can not be compared with raw write to
> a pty.
> > Can any one suggest me the idea how i need to implement this problem.
> For a reliable solution you need to have a special program (either
> custom-made or a standard one but one which is made to explicitly
> support automation) running on the server side, and communicate with
> that software using a custom or a standard protocol, also one that is
> made for automation of the tasks and actions that you want to automate.
> //Peter
> _______________________________________________
> libssh2-devel

Received on 2015-08-26