LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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



Reply
 
Search this Thread
Old 09-07-2007, 08:13 AM   #1
vdx
Member
 
Registered: Aug 2007
Location: The Greate INDIA
Distribution: CentOS, RHEL, Fedora
Posts: 102

Rep: Reputation: 24
Lightbulb 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....
 
Old 09-07-2007, 09:24 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.
 
Old 09-08-2007, 03:06 AM   #3
vdx
Member
 
Registered: Aug 2007
Location: The Greate INDIA
Distribution: CentOS, RHEL, Fedora
Posts: 102

Original Poster
Rep: Reputation: 24
Question

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 ?
 
Old 09-08-2007, 12:13 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.
 
Old 09-09-2007, 02:35 AM   #5
vdx
Member
 
Registered: Aug 2007
Location: The Greate INDIA
Distribution: CentOS, RHEL, Fedora
Posts: 102

Original Poster
Rep: Reputation: 24
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...
 
Old 09-10-2007, 11:23 PM   #6
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
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).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't SSH to remote machine: Connection closed by remote host Avatar Linux - Networking 34 05-24-2013 10:28 AM
remote login screen but need local login lastkey Ubuntu 0 12-13-2006 02:41 AM
Anyone got the Remote Wonder (ATI's USB remote control) to work under Linux? dezireduser Linux - Hardware 2 11-06-2005 09:47 AM
Remote Mounting? (Mount remote folder on local filesystem) mac_phil Linux - Networking 1 11-15-2003 04:48 PM
using linux to redirect remote vpn traffic to another remote machine brb5548 Linux - Networking 0 06-28-2003 10:07 PM


All times are GMT -5. The time now is 07:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration