Operating System - Linux
1745865 Members
4425 Online
108723 Solutions
New Discussion юеВ

executing commands using ssh protocol- message is coming

 
ManojKumar
Advisor

executing commands using ssh protocol- message is coming

Hi all,

Following message is coming when i am going to login a device using ssh protocol .

It is coming first time only .

Message ::

The authenticity of host '192.*.*.* (192.*.*.*)' can't be established.
RSA key fingerprint is 14:15:0f:e1:1b:8d:d6:ed:5b:cd:f5:30:1f:a2:49:c2.
Are you sure you want to continue connecting (yes/no)?



Through my program i am not able to provide "yes" or "no"- (i am working on .net platform)

Problem:
How to get rid of this message .
If it is possible to ignore this message then plz let me know the same .

regards,
manoj
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: executing commands using ssh protocol- message is coming

Shalom manoj,

You need to do the ssh to the host one time interactively, answer the question then the message will stop happening.

If you answer yes of course.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: executing commands using ssh protocol- message is coming

You should add the remote public key to your local list of known hosts. Where? whell, it depends of the ssh client, check your ssh client documentation.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
ManojKumar
Advisor

Re: executing commands using ssh protocol- message is coming

Hi all,

Thanks for a quick response .

First of all i want to tell you that i have to do everything using a .Net(c#) program- i can't enter "yes" manually .

Copying public keys to the known_hosts file is enough or not - i m not sure about that- .

Can't we ignore or bypass this message .

regards,
Vitaly Karasik_1
Honored Contributor

Re: executing commands using ssh protocol- message is coming

If your client(program) is able to connect to ssh server second time, you may ignore this message - probably .net ssh library answer "yes" automatically.
Vipulinux
Respected Contributor

Re: executing commands using ssh protocol- message is coming

Hi
Have u tried public key authentication...it shoul dnot ask for yes/no

Check this out:

http://www.linuxhomenetworking.com/linux-hn/ssh-server.htm

Cheers
Jeroen Peereboom
Honored Contributor

Re: executing commands using ssh protocol- message is coming

Manoj.

if you use ssh to connect to an unknown machine you are asked to say yes. That's one of the reasons it is called secure shell. The method used (comparing keys) helps in identifying attacks by replacing the machine by another one.

Somehow you must supply the ssh client with the server's key, either by logging in manually one time, or by generating keys and exchange them.

JP
Mike Stroyan
Honored Contributor

Re: executing commands using ssh protocol- message is coming

If you really want to give up the security of knowing when host has been replaced, then you could add
StrictHostKeyChecking no
to the "Host *" section in /etc/ssh/ssh_config or ~/.ssh/ssh_config. That tells ssh to add a new host key without even asking.