473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Executing commands in a remote machine using python

vinoj
3
Hi All,
These are the following things which i want to do:-[list]
1. I will be taking the ipaddress, username and password from the user using cgi ffrom the browser.
2. Now i want to get the mac address which i can get by connecting to the remote machine and by executing ifconfig command.

Now to connect to a remote machine in python i tried using pexpect module by which i can ssh to remote machine and get the mac address.

I was successful in using the pexpect module but its working only from the linux terminal i.e. when i run the program at the command prompt, but when i use that program through cgi, it gives me a pexpect exception which is as follows.


pexpect.ExceptionPexpect: Error! pty.fork() failed: out of pty devices\

Am i using the right module plz help me out.....................
Thank You,
Vinoj Davis
Jan 2 '08 #1
0 1789

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Sean | last post by:
I can connect to a machine remotely with no problems but I'm having trouble trying to create a process remotely. Initially this was a perl and VB script which I'm converting to python. Its entire...
4
by: hokieghal99 | last post by:
This may not be possible, but I thought I'd ask anyway. Could I get the below code to run on a Python server where other machines would connect to it (say thru the Web) and get details of *their*...
6
by: Hank | last post by:
Hi, I was wondering how I would execute a file remotely? For example, test.exe resides on machine A, my python script is running on Machine B. I would like to execute "test.exe -parameters" on...
8
by: robert | last post by:
Hello, I want to put (incrementally) changed/new files from a big file tree "directly,compressed and password-only-encrypted" to a remote backup server incrementally via FTP,SFTP or DAV.... At...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.