Problem with perl and python script in SSH programming.
ProgrammingThis 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.
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.
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.
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:
Explain your needs to your sysadmin. See if you can get the gcc package even temporarily installed for this purpose; or
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.