how to make remote login and remote installation via libssh
I want to login into a remote system and install a package remotely,
for tht I found "libssh".
If is there any good tutorial or how to remote install and remote login via "libssh", then plz let me kno...abt tht...
thnx in advance....
It isn't clear from your question whether you want to write a program that uses ssh/ssl to perform a login & install procedure, or whether you want to use a ready-made tool to do this. If the latter, the ssh client can be used to login to a remote host (that must have a ssh daemon running). If the former, please provide more details of specifically what your application must do, and at least let us know what programming language you intend to implement it with. Many common libraries have bindings to numerous programming languages. It seems likely that an existing ssh client plus some shell scripting can be used to do most, if not all, of your objective.
thnx for ur replay.
Let me explain in brief.
I am using C (gcc) language for development of programs.
I am using RHEL5 distro and I wanna develop a program(daemon) tht can install a package to a remote PC.
for tht I have to first login into remote host and then have to install a desired package into it.
for tht I think tht libssh-0.2 can help me a lot.
so the question is, how to perform remote login and after tht the remote installation procedure in remote PC using my program.
Means my daemon works like this,
After each and every 1 hour, my program looks into a directory, and if it finds packeges then it installs it to a remote PC.
so programatically how can I accomplish this ?
Is there any good tutorial for libssh ? or Any sample program ?
I took a look at the online documentation for the library, and I thought it looked pretty good. As for how to perform a software installation on the remote host, I think you will have to create a system that feeds command strings into your ssh connections, and then reads the responses. You will have to go through a number of manual installation sessions to see what strings are required (what stuff you would manually type).
Alternatively, you could simply set up a script or program on the remote host, and invoke it with a ssh session in a cron job. This sounds a lot easier, and more conventional.
Using either method, you will need to set up ssl keys on the respective machines to eliminate interactive password entry. If you haven't already done that, it would be the best place to start. You may learn something that is generally useful, even beyond the parameters of this project.
Get a start on your project and come back with some more specific questions.
thnx for reply me.
and the ssl key sounds me better hint for my project
so thnx once again...
I will work on tht and will give u good news soon...
Re ssl key; don't you mean ssh auth-keys?
BTW, you could probably use eg rsync to put files across (rsync can use ssh protocol).
|All times are GMT -5. The time now is 11:50 AM.|