Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-07-2007, 07:13 AM
|
#1
|
Member
Registered: Aug 2007
Location: The Greate INDIA
Distribution: CentOS, RHEL, Fedora
Posts: 102
Rep:
|
how to make remote login and remote installation via libssh
helo frnds,
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....
|
|
|
09-07-2007, 08:24 AM
|
#2
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
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.
--- rod.
|
|
|
09-08-2007, 02:06 AM
|
#3
|
Member
Registered: Aug 2007
Location: The Greate INDIA
Distribution: CentOS, RHEL, Fedora
Posts: 102
Original Poster
Rep:
|
dear theNbomr
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.
thts all.
so programatically how can I accomplish this ?
Is there any good tutorial for libssh ? or Any sample program ?
|
|
|
09-08-2007, 11:13 AM
|
#4
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
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.
--- rod.
|
|
|
09-09-2007, 01:35 AM
|
#5
|
Member
Registered: Aug 2007
Location: The Greate INDIA
Distribution: CentOS, RHEL, Fedora
Posts: 102
Original Poster
Rep:
|
dear theNbomr
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...
|
|
|
09-10-2007, 10:23 PM
|
#6
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,442
|
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 01:18 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|