LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 07-01-2012, 12:42 AM   #1
em31amit
Member
 
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190

Rep: Reputation: 55
Problem with perl and python script in SSH programming.


Hello All,


I want to build some ssh based tools to access various linux based server to do execute some shell scripts and execute command remotely on those servers. there are too many servers.

so i want to develop some tools/scripts with perl and python not in bash script, I know, In open source community there are some tools already available and i can use them. but still i want to create my own tools/script and also. those tools are depended on some of specific module and module's dependencies.


I cannot install those module with root or not in "lib" directory and not even i can compile with GCC. I have to install those into a normal user which don't have root access and to user's home directory.


I tried to use Net::OpenSSH in perl, and successfully install it in user's home directory but while writing the code it require IO:Pty , that's need to to be build with GCC to install


So Is there any workaround for this ? any compiled module available?


In Python ,

I tried to use paramiko, but it also required some other library such as PyCrypto and other's . Paramiko can be install in user's home directory but how i can use PyCrypto to install/compile and pass the option to use Paramiko.

Any solution or workaround for this?



I am using RHEL5.x


Thanks,
 
Old 07-01-2012, 05:38 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by em31amit
I cannot install those module with root or not in "lib" directory and not even i can compile with GCC. I have to install those into a normal user which don't have root access and to user's home directory.

I tried to use Net::OpenSSH in perl, and successfully install it in user's home directory but while writing the code it require IO:Pty , that's need to to be build with GCC to install

...

I am using RHEL5.x,
Inability to install under root-owned directories is not a problem (you could install your own Perl and accompanying modules). But inability to compile source code with gcc(1) is going to make your goal trickier.

My opinion on how to proceed:
  1. Explain your needs to your sysadmin. See if you can get the gcc package even temporarily installed for this purpose; or
  2. Build your own Perl - and needed modules - on a very similar system, where you do have rootly access to install gcc. When you're finished with the build and testing, tar(1) up the entire Perl base directory, and migrate it to your other system.

Option #1 is best. And, even if you're doing option #2, it would be polite and prudent to keep your sysadmin informed about it.
 
  


Reply



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
Python related: How to access a Perl script behind a firewall from Python? vxc69 Programming 8 12-14-2010 07:32 AM
perl script call python -linux cdd Linux - Software 1 05-03-2007 03:45 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:46 AM.

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
Open Source Consulting | Domain Registration