Re: How to use ssh-agent in windows in python?

2019-06-05 Thread Fc Zwtyds
using ssh-agent ssh-add has been running successfully. In addition to the code you wrote to me, I also refer to man ssh-agent and subprocess: Subprocess management. I now know the importance of environment variables. Excellent. I'm glad to hear it. BTW, this program is for visit youtube

Re: How to use ssh-agent in windows in python?

2019-05-31 Thread Cameron Simpson
On 31May2019 21:51, Fc Zwtyds wrote: 在 2019-05-30 6:41, Cameron Simpson 写道: The you could just use os.system() to run the other commands, because the environment now has the necessary environment settings. [...] Under your guidance, the python code using ssh-agent ssh-add has been running

Re: How to use ssh-agent in windows in python?

2019-05-31 Thread Fc Zwtyds
,   Under your guidance, the python code using ssh-agent ssh-add has been running successfully. In addition to the code you wrote to me, I also refer to man ssh-agent and subprocess: Subprocess management. I now know the importance of environment variables.   This problem has puzzled me for nearly

Re: How to use ssh-agent in windows in python?

2019-05-31 Thread Fc Zwtyds
using ssh-agent ssh-add has been running successfully. In addition to the code you wrote to me, I also refer to man ssh-agent and subprocess: Subprocess management. I now know the importance of environment variables. This problem has puzzled me for nearly two weeks and solved this problem

Re: How to use ssh-agent in windows in python?

2019-05-31 Thread Fc Zwtyds
,   Under your guidance, the python code using ssh-agent ssh-add has been running successfully. In addition to the code you wrote to me, I also refer to man ssh-agent and subprocess: Subprocess management. I now know the importance of environment variables.   This problem has puzzled me for nearly

Re: How to use ssh-agent in windows in python?

2019-05-29 Thread eryk sun
On 5/29/19, Cameron Simpson wrote: > > So start with this: > > p = subprocess.Popen('ssh-agent -s', stdin = subprocess.PIPE, stdout = > subprocess.PIPE, stderr = subprocess.PIPE, shell = True, universal_newlines > = True) I'm wary of relying on the default

Re: How to use ssh-agent in windows in python?

2019-05-29 Thread Fc Zwtyds
在 2019-05-30 6:41, Cameron Simpson 写道: On 29May2019 22:37, Fc Zwtyds wrote: 在 2019-05-27 11:19, Cameron Simpson 写道: The output of "ssh-agent -s" is Bourne shell variable assignment syntax. You need to parse that [...]  I want to rewrite the shell script to python script so

Re: How to use ssh-agent in windows in python?

2019-05-29 Thread Cameron Simpson
On 29May2019 22:37, Fc Zwtyds wrote: 在 2019-05-27 11:19, Cameron Simpson 写道: The output of "ssh-agent -s" is Bourne shell variable assignment syntax. You need to parse that [...] I want to rewrite the shell script to python script so I have had changed the "ssh-agent -s&quo

Re: How to use ssh-agent in windows in python?

2019-05-29 Thread Fc Zwtyds
在 2019-05-27 11:19, Cameron Simpson 写道: The output of "ssh-agent -s" is Bourne shell variable assignment syntax. You need to parse that and then install those values in so.environ before calling the second command. The subprocess module has methods for collecting the output of a co

Re: How to use ssh-agent in windows in python?

2019-05-27 Thread Fc Zwtyds
在 2019-05-27 18:59, coldpizza 写道: example code for doing it in pure python: http://code.activestate.com/recipes/576810-copy-files-over-ssh-using-paramiko/ Thank you very much and the information you recommended, I will take the time to learn it: paramiko -- https://mail.python.org/mailman

Re: How to use ssh-agent in windows in python?

2019-05-27 Thread Fc Zwtyds
在 2019-05-27 11:19, Cameron Simpson 写道: On 27May2019 08:22, Fc Zwtyds wrote: Thank you very much for your detailed answer. I will try to learn how to capture and parse the output of "ssh-agent -s" and learn how to talk to the agent. The output of "ssh-agent -s" is B

Re: How to use ssh-agent in windows in python?

2019-05-27 Thread coldpizza
example code for doing it in pure python: http://code.activestate.com/recipes/576810-copy-files-over-ssh-using-paramiko/ -- https://mail.python.org/mailman/listinfo/python-list

Re: How to use ssh-agent in windows in python?

2019-05-26 Thread Cameron Simpson
On 27May2019 08:22, Fc Zwtyds wrote: Thank you very much for your detailed answer. I will try to learn how to capture and parse the output of "ssh-agent -s" and learn how to talk to the agent. The output of "ssh-agent -s" is Bourne shell variable assignment syntax. Yo

Re: How to use ssh-agent in windows in python?

2019-05-26 Thread Fc Zwtyds
在 2019-05-27 7:13, Cameron Simpson 写道: On 26May2019 22:55, Fc Zwtyds wrote:  I am using cygwin on Windows 8.1. These two commands work fine in  cygwin: ssh-agent -s ssh-add ~/.ssh /id_rsa No, they run without error (apparently). That is  an entirely different thing. In particular, &quo

Re: How to use ssh-agent in windows in python?

2019-05-26 Thread Fc Zwtyds
在 2019-05-27 0:27, MRAB 写道: On 2019-05-26 15:55, Fc Zwtyds wrote: Hi,     I am using cygwin on Windows 8.1. These two commands work fine in cygwin: ssh-agent -s ssh-add ~/.ssh /id_rsa     I tried to use them on windows cmd and it worked fine. Now I am going to use python to write code to

Re: How to use ssh-agent in windows in python?

2019-05-26 Thread Cameron Simpson
On 26May2019 22:55, Fc Zwtyds wrote: I am using cygwin on Windows 8.1. These two commands work fine in cygwin: ssh-agent -s ssh-add ~/.ssh /id_rsa No, they run without error (apparently). That is an entirely different thing. In particular, "ssh-agent -s" starts an agent but

Re: How to use ssh-agent in windows in python?

2019-05-26 Thread MRAB
On 2019-05-26 15:55, Fc Zwtyds wrote: Hi, I am using cygwin on Windows 8.1. These two commands work fine in cygwin: ssh-agent -s ssh-add ~/.ssh /id_rsa I tried to use them on windows cmd and it worked fine. Now I am going to use python to write code to implement the above command

How to use ssh-agent in windows in python?

2019-05-26 Thread Fc Zwtyds
Hi, I am using cygwin on Windows 8.1. These two commands work fine in cygwin: ssh-agent -s ssh-add ~/.ssh /id_rsa I tried to use them on windows cmd and it worked fine. Now I am going to use python to write code to implement the above command. os.system('ssh-agent -s') os.syste

Re: Passing arguments to & executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2017-06-09 Thread niteesh . k80
hey did you find the answer for this -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and ssh for remote login

2016-10-06 Thread Noah
On 6 Oct 2016 04:56, "Michael Torrie" wrote: > > On 10/05/2016 11:46 AM, Noah wrote: > > Hello folk, > > > > I would like to use a python script to ssh into a server using a username > > and password and perhaps ass port. > > > > Any ideas on

Re: Python and ssh for remote login

2016-10-05 Thread Michael Torrie
On 10/05/2016 11:46 AM, Noah wrote: > Hello folk, > > I would like to use a python script to ssh into a server using a username > and password and perhaps ass port. > > Any ideas on how to script that. If paramiko doesn't fit your needs, traditionally this sort of work wa

Re: Python and ssh for remote login

2016-10-05 Thread Noah
On 5 Oct 2016 22:02, "Ethan Furman" wrote: > > On 10/05/2016 10:46 AM, Noah wrote: > >> I would like to use a python script to ssh into a server using a username >> and password [...] > > > I've written a module called scription to help with scripts;

Re: Python and ssh for remote login

2016-10-05 Thread Ethan Furman
On 10/05/2016 10:46 AM, Noah wrote: I would like to use a python script to ssh into a server using a username and password [...] I've written a module called scription to help with scripts; it supports giving passwords to programs like ssh. Here's an example from one of my utili

Re: Python and ssh for remote login

2016-10-05 Thread Noah
Hi Rob Thank you for your email. I am guessing that is some module. Ok i will pip it and see how it goes. Noah On 5 Oct 2016 21:32, "Rob Gaddi" wrote: > Noah wrote: > > > Hello folk, > > > > I would like to use a python script to ssh into a server usi

Re: Python and ssh for remote login

2016-10-05 Thread Rob Gaddi
Noah wrote: > Hello folk, > > I would like to use a python script to ssh into a server using a username > and password and perhaps ass port. > > Any ideas on how to script that. > > Thanks > > Noah paramiko -- Rob Gaddi, Highland Technology -- www.highlandtechnolo

Python and ssh for remote login

2016-10-05 Thread Noah
Hello folk, I would like to use a python script to ssh into a server using a username and password and perhaps ass port. Any ideas on how to script that. Thanks Noah -- https://mail.python.org/mailman/listinfo/python-list

Re: how to set paramiko to use ssh version 1?

2016-09-09 Thread Lawrence D’Oliveiro
On Thursday, September 1, 2016 at 3:26:26 PM UTC+12, meInvent bbird wrote: > how to set paramiko to use ssh version 1? Be polite, but firm. Tell it “paramiko, this is ssh version 1, use it”. Then, when it responds “but SSHv1 is an obsolete stinking pile of crap that nobody in their right m

how to set paramiko to use ssh version 1?

2016-09-01 Thread meInvent bbird
how to set paramiko to use ssh version 1? -- https://mail.python.org/mailman/listinfo/python-list

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
Hey, its resolved by small tweak :) do child.sendline('logout') instead of child.logout() Thanks... -- https://mail.python.org/mailman/listinfo/python-list

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: &#

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: &#

Re: issue while doing pexpect ssh

2015-09-09 Thread Laura Creighton
>Hey All, > >I am able to achieve this using pxssh.. thank you for help... Great to hear it. Good luck with the crazies. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: issue while doing pexpect ssh

2015-09-09 Thread Laura Creighton
In a message of Wed, 09 Sep 2015 01:58:30 -0700, harirammanohar...@gmail.com wr ites: >Thank you for spawnu, now i got stuck with freezing issue similar to it is not >returing to the shell prompt...its on waiting...i had to press ctrl+c > >=== >child.sendline(password) >child.expect('-bas

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: &#

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: &#

Re: issue while doing pexpect ssh

2015-09-08 Thread Laura Creighton
In a message of Tue, 08 Sep 2015 23:57:41 +1000, Chris Angelico writes: >On Tue, Sep 8, 2015 at 9:37 PM, wrote: >> Some where i am missing simple logic :) >> >> = >> child = pexpect.spawn('ssh hari@hostname') >> child.logfile = s

Re: issue while doing pexpect ssh

2015-09-08 Thread jmp
On 09/08/2015 03:57 PM, Chris Angelico wrote: On Tue, Sep 8, 2015 at 9:37 PM, wrote: Some where i am missing simple logic :) = child = pexpect.spawn('ssh hari@hostname') child.logfile = sys.stdout child.expect('hari\'s Password: ') =

Re: issue while doing pexpect ssh

2015-09-08 Thread Chris Angelico
On Tue, Sep 8, 2015 at 9:37 PM, wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: ') > = > > getting error as foll

Re: issue while doing pexpect ssh

2015-09-08 Thread Laura Creighton
In a message of Tue, 08 Sep 2015 04:37:09 -0700, harirammanohar...@gmail.com wr ites: >Some where i am missing simple logic :) > >= >child = pexpect.spawn('ssh hari@hostname') >child.logfile = sys.stdout >child.expect('hari\'s Password:

issue while doing pexpect ssh

2015-09-08 Thread harirammanohar159
Some where i am missing simple logic :) = child = pexpect.spawn('ssh hari@hostname') child.logfile = sys.stdout child.expect('hari\'s Password: ') = getting error as follows: child.expect('hari\'s Password: ') TypeError: mu

Re: MySQL connection over SSH

2015-05-12 Thread chrismeek4542
(2003, "Can't connect to MySQL server on 'mcsdev.croft-it.com' (60)") -- https://mail.python.org/mailman/listinfo/python-list

MySQL connection over SSH

2015-05-12 Thread chrismeek4542
I am trying to connect to a remote MySQL Database over SSH. I am using paramiko and SQLAlchemy. I assume that my sqlalchemy engine is not going through the SSH tunnel. Here is what i have so far. Not sure where to go from here though. import paramiko from sqlalchemy import create_engine ssh

Re: Unable to find ssh library supporting python 3.1

2014-07-30 Thread Chris “Kwpolska” Warrick
On Wed, Jul 30, 2014 at 1:49 PM, Chirag Dhyani wrote: > Hi, > > Could you suggest me ssh library supporting python 3.1, to a surprise I > checked pramiko, fabric, etc etc and no one does. even workaround with > plumbum but not helpful. We have a project entirely on python 3.1 a

Unable to find ssh library supporting python 3.1

2014-07-30 Thread Chirag Dhyani
Hi, Could you suggest me ssh library supporting python 3.1, to a surprise I checked pramiko, fabric, etc etc and no one does. even workaround with plumbum but not helpful. We have a project entirely on python 3.1 and now we are stuck with ssh. Please help Thank you ~Chi -- https

Re: SSH/Telnet program to Router/switch

2014-02-27 Thread Rodrick Brown
;> I am new to programming and python. I am looking for a python script to do >>> ssh/telnet to a network equipment ? I know tcl/perl does this using >>> expect/send. >> >> >>> Do we have expect available in python as well or need to use some other >>&g

Re: SSH/Telnet program to Router/switch

2014-02-25 Thread Ferrous Cranus
Τη Τετάρτη, 19 Φεβρουαρίου 2014 10:45:53 π.μ. UTC+2, ο χρήστης Wojciech Łysiak έγραψε: > On 19.02.2014 09:14, Sujith S wrote: > > > Hi, > > > > > > I am new to programming and python. I am looking for a python script to do > > ssh/telnet to a network e

Re: SSH/Telnet program to Router/switch

2014-02-19 Thread William Ray Wing
On Feb 19, 2014, at 3:14 AM, Sujith S wrote: > Hi, > > I am new to programming and python. I am looking for a python script to do > ssh/telnet to a network equipment ? I know tcl/perl does this using > expect/send. > > Do we have expect available in python as well or n

Re: SSH/Telnet program to Router/switch

2014-02-19 Thread Roy Smith
In article , Roy Smith wrote: > in conjunction with a near command-line driver tool called fab Typo there: "near" should have been "neat". [this is why I love wikis] -- https://mail.python.org/mailman/listinfo/python-list

Re: SSH/Telnet program to Router/switch

2014-02-19 Thread Chris Angelico
On Thu, Feb 20, 2014 at 12:35 AM, Roy Smith wrote: > As far as I know, fabric only works with ssh. If you are forced to use > telnet to talk to legacy equipment, that's another problem. If it's telnet, it's likely to be a pretty simple protocol. All you really need is the

Re: SSH/Telnet program to Router/switch

2014-02-19 Thread Roy Smith
In article , Sujith S wrote: > Hi, > > I am new to programming and python. I am looking for a python script to do > ssh/telnet to a network equipment ? I know tcl/perl does this using > expect/send. > > Do we have expect available in python as well or need to use

Re: SSH/Telnet program to Router/switch

2014-02-19 Thread Johannes Schneider
On 19.02.2014 09:14, Sujith S wrote: Hi, I am new to programming and python. I am looking for a python script to do ssh/telnet to a network equipment ? I know tcl/perl does this using expect/send. Do we have expect available in python as well or need to use some other method ? Regards Sujith

Re: SSH/Telnet program to Router/switch

2014-02-19 Thread Wojciech Łysiak
On 19.02.2014 09:14, Sujith S wrote: > Hi, > > I am new to programming and python. I am looking for a python script to do > ssh/telnet to a network equipment ? I know tcl/perl does this using > expect/send. > > Do we have expect available in python as well or need to use

Re: SSH/Telnet program to Router/switch

2014-02-19 Thread Chris Angelico
On Wed, Feb 19, 2014 at 7:14 PM, Sujith S wrote: > Hi, > > I am new to programming and python. I am looking for a python script to do > ssh/telnet to a network equipment ? I know tcl/perl does this using > expect/send. > > Do we have expect available in python as well or n

SSH/Telnet program to Router/switch

2014-02-19 Thread Sujith S
Hi, I am new to programming and python. I am looking for a python script to do ssh/telnet to a network equipment ? I know tcl/perl does this using expect/send. Do we have expect available in python as well or need to use some other method ? Regards Sujith -- https://mail.python.org/mailman

Re: Python 3 and SSH Tunnel

2013-08-10 Thread Veritatem Ignotam
ot wish to change the database from listening to any other thing than localhost for security reasons, so i assume the best solution for me would be to make the program create some ssh tunnels before the saving/loading happens. But would this policy make my database (or the rest of the databases that i

Python 3.3 + QtSql + ssh tunnel - Connection problem

2013-08-10 Thread D. Xenakis
Im using python 3.3 on win7 64bit and trying to connect to a MySQL database on a remote server through a putty ssh tunnel. Running the script below im getting "Physical connection to the database did not activate!". What im i doing wrong?! I tried to find a working example but couldn

Re: Python 3 and SSH Tunnel

2013-08-10 Thread D. Xenakis
assume the best solution for me would be to make the program create some ssh tunnels before the saving/loading happens. But would this policy make my database (or the rest of the databases that im running on that machine) unsecure? Is there any workaround this? How would you do that online

Re: Python 3 and SSH Tunnel

2013-08-09 Thread Bernd Waterkamp
ay from the program so that > things roll easy. I thought maybe i should find a way how to call and > run a batch file from inside my python program or a powershell command, > but i do not know even if that could work for the ssh tunneling. > > any ideas? Both popular frameworks f

Re: Python 3 and SSH Tunnel

2013-08-08 Thread Chris Angelico
On Fri, Aug 9, 2013 at 1:50 AM, D. Xenakis wrote: >> Alternatively, can you use PostgreSQL instead? :) > > Yes there is such an option to be honest. > Would that be helpfull instead of MySQL? It would, mainly because it's simply a better database engine. Everything to do with tunneling is going t

Re: Python 3 and SSH Tunnel

2013-08-08 Thread Chris Angelico
to > be done in an automatic way from the program so that things roll easy. > I thought maybe i should find a way how to call and run a batch file from > inside my python program or a powershell command, but i do not know even if > that could work for the ssh tunneling. You shoul

Re: Python 3 and SSH Tunnel

2013-08-08 Thread D. Xenakis
> Alternatively, can you use PostgreSQL instead? :) Yes there is such an option to be honest. Would that be helpfull instead of MySQL? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3 and SSH Tunnel

2013-08-08 Thread D. Xenakis
> > HOWTO anyone? > > > > > > What im trying to succeed here is create one SSH tunnel, so that i can > > connect from a python script running on my pc, to a remote MySQL database > > running on my Host and id like to stick with Python 3.3 . > > >

Re: Python 3 and SSH Tunnel

2013-08-08 Thread Chris Angelico
On Thu, Aug 8, 2013 at 8:30 PM, D. Xenakis wrote: > HOWTO anyone? > > What im trying to succeed here is create one SSH tunnel, so that i can > connect from a python script running on my pc, to a remote MySQL database > running on my Host and id like to stick with Python 3.3 . >

Re: Python 3 and SSH Tunnel

2013-08-08 Thread Skip Montanaro
On Thu, Aug 8, 2013 at 2:30 PM, D. Xenakis wrote: > HOWTO anyone? > > What im trying to succeed here is create one SSH tunnel, so that i can > connect from a python script running on my pc, to a remote MySQL database > running on my Host and id like to stick with Python 3.3 . ht

Python 3 and SSH Tunnel

2013-08-08 Thread D. Xenakis
HOWTO anyone? What im trying to succeed here is create one SSH tunnel, so that i can connect from a python script running on my pc, to a remote MySQL database running on my Host and id like to stick with Python 3.3 . I contacted my host and he informed me that this is the only way. I tried

Re: Library to work with SSH public keys

2013-04-07 Thread Darren Spruell
On Sat, Apr 6, 2013 at 5:49 AM, Roy Smith wrote: > In article , > Darren Spruell wrote: > >> I'd like to work with user submitted/uploaded SSH public keys from >> Python. I'm trying to solve what I'd thought might be a simple need: >> given a user

Re: Library to work with SSH public keys

2013-04-06 Thread Roy Smith
In article , Darren Spruell wrote: > I'd like to work with user submitted/uploaded SSH public keys from > Python. I'm trying to solve what I'd thought might be a simple need: > given a user's OpenSSH formatted _public_ key (RSA, or DSA, or > whatever), how do

Library to work with SSH public keys

2013-04-05 Thread Darren Spruell
I'd like to work with user submitted/uploaded SSH public keys from Python. I'm trying to solve what I'd thought might be a simple need: given a user's OpenSSH formatted _public_ key (RSA, or DSA, or whatever), how do you obtain information about it such as: key type (e.g.

Re: SSH Connection with Python

2012-10-29 Thread Roy Smith
In article , Gelonida N wrote: > On 10/29/2012 02:10 PM, Roy Smith wrote: > > In article , > > Gelonida N wrote: > > > >> The sh module looks intersting, but it's not supported for Windows > >> platforms. > > > > "The X module looks interesting but it's not supported for Windows" is > > true

Re: SSH Connection with Python

2012-10-29 Thread Gelonida N
On 10/29/2012 02:10 PM, Roy Smith wrote: In article , Gelonida N wrote: The sh module looks intersting, but it's not supported for Windows platforms. "The X module looks interesting but it's not supported for Windows" is true for many values of X. It's all part of the TCO of using a brain

Re: SSH Connection with Python

2012-10-29 Thread Gelonida N
On 10/29/2012 04:18 PM, David Robinow wrote: On Sun, Oct 28, 2012 at 4:09 PM, Gelonida N wrote: The only thing I'm concerned about paramiko is, that I don't see any activity on the paramiko site and that one library it depends on is not available is windows binary package for newer versions of

Re: SSH Connection with Python

2012-10-29 Thread David Robinow
On Sun, Oct 28, 2012 at 4:09 PM, Gelonida N wrote: > The only thing I'm concerned about paramiko is, that I don't see any > activity on the paramiko site and that one library it depends on is not > available is windows binary package for newer versions of python. > I don't understand why this is

Re: SSH Connection with Python

2012-10-29 Thread Roy Smith
In article , Gelonida N wrote: > The sh module looks intersting, but it's not supported for Windows > platforms. "The X module looks interesting but it's not supported for Windows" is true for many values of X. It's all part of the TCO of using a brain-dead operating system. -- http://mail

Re: SSH Connection with Python

2012-10-29 Thread Christian
Am Donnerstag, 25. Oktober 2012 12:31:46 UTC+2 schrieb Schneider: > Hi Folkz, > > how can i create a SSH-Connection with python? I have to send some > > commands to the remote host and parse their answers. > > greatz Johannes There is a module in chilkat. http://www.ex

Re: SSH Connection with Python

2012-10-29 Thread Schneider
thank you guys for the huge list of answers, In my setting I have to access some routers and firewall from a linux-client. I think I'll try Fabric. On 26.10.2012 06:20, Rodrick Brown wrote: On Oct 25, 2012, at 6:34 AM, Schneider wrote: Hi Folkz, how can i create a SSH-Connection

Re: SSH Connection with Python

2012-10-28 Thread Gelonida N
On 10/26/2012 05:22 AM, Jason Friedman wrote: how can i create a SSH-Connection with python? I have to send some commands to the remote host and parse their answers. Consider also the sh module: http://amoffat.github.com/sh/tutorials/2-interacting_with_processes.html. Just a minor comment

Re: SSH Connection with Python

2012-10-28 Thread Gelonida N
at farbic | (at least not as solution on windows python 2.7 without having to try to | recompile pycrypto myself) Many years ago we ran an ssh executable on Windows; it was a tiny standalone kit consisting, IIRC, of the Cygwin libc and ssh. Or you could just install Cygwin... That would let you use

Re: SSH Connection with Python

2012-10-27 Thread Cameron Simpson
ws python 2.7 without having to try to | recompile pycrypto myself) Many years ago we ran an ssh executable on Windows; it was a tiny standalone kit consisting, IIRC, of the Cygwin libc and ssh. Or you could just install Cygwin... That would let you use Python's subprocess module to invoke

Re: SSH Connection with Python

2012-10-27 Thread Gelonida N
On 10/27/2012 02:21 AM, Roy Smith wrote: In article , Gelonida N wrote: Another problem is, that paramiko depends on pycrypto 2.1+ which doesn't exist as binary release for python 2.7 I'm running paramiko-1.7.6 with python 2.7.3 on my Ubunto Precise box. I'm reasonably sure all I did was "

Re: SSH Connection with Python

2012-10-26 Thread Roy Smith
s fabric capable of performing scp / sftp Fabric uses ssh to make connections, and it is capable of copying files. For all intents and purposes, I'd say that means it is capable of "performing scp / sftp" (both of which are just front-ends to the same basic ssh protocol. But, keep

Re: SSH Connection with Python

2012-10-26 Thread Gelonida N
On 10/25/2012 12:47 PM, Kamlesh Mutha wrote: You can use paramiko module. Very easy to use. I also use paramiko for a small script. However I'm a little hesitant to use paramik for new code. The web page says: "last updated 21-May-2011" and the github url http://github.com/robey/paramiko/

Re: SSH Connection with Python

2012-10-25 Thread Rodrick Brown
On Oct 25, 2012, at 6:34 AM, Schneider wrote: > Hi Folkz, > how can i create a SSH-Connection with python? I have to send some commands > to the remote host and parse their answers. > greatz Johannes Fabric is the way to go! > -- > http://mail.python.org/mailman/listinfo/py

Re: SSH Connection with Python

2012-10-25 Thread Jason Friedman
> how can i create a SSH-Connection with python? I have to send some commands > to the remote host and parse their answers. Consider also the sh module: http://amoffat.github.com/sh/tutorials/2-interacting_with_processes.html. -- http://mail.python.org/mailman/listinfo/python-list

Re: SSH Connection with Python - Oops

2012-10-25 Thread Peter Pearson
On 25 Oct 2012 16:55:46 GMT, Peter Pearson wrote: > On Thu, 25 Oct 2012 12:16:58 +0200, Schneider wrote: >> how can i create a SSH-Connection with python? I have to send some >> commands to the remote host and parse their answers. >> greatz Johannes > &

Re: SSH Connection with Python

2012-10-25 Thread Peter Pearson
On Thu, 25 Oct 2012 12:16:58 +0200, Schneider wrote: > how can i create a SSH-Connection with python? I have to send some > commands to the remote host and parse their answers. > greatz Johannes I've been using Twisted (twistedmatrix.com). It is especially convenient for the se

Re: SSH Connection with Python

2012-10-25 Thread Demian Brecht
On 2012-10-25, at 3:16 AM, Schneider wrote: > how can i create a SSH-Connection with python? I have to send some commands > to the remote host and parse their answers. I have yet to use it, but Fabric (http://docs.fabfile.org/en/1.4.3/) should have everything you're looking for.

Re: SSH Connection with Python

2012-10-25 Thread Roy Smith
In article , Schneider wrote: > Hi Folkz, > how can i create a SSH-Connection with python? I have to send some > commands to the remote host and parse their answers. > greatz Johannes At a low level, you want to look at the paramiko library. Built on top of that, and adding ho

Re: SSH Connection with Python

2012-10-25 Thread Kamlesh Mutha
You can use paramiko module. Very easy to use. On Thu, Oct 25, 2012 at 4:04 PM, Laszlo Nagy wrote: > On 2012-10-25 12:16, Schneider wrote: > >> Hi Folkz, >> how can i create a SSH-Connection with python? I have to send some >> commands to the remote host and parse

Re: SSH Connection with Python

2012-10-25 Thread Laszlo Nagy
On 2012-10-25 12:16, Schneider wrote: Hi Folkz, how can i create a SSH-Connection with python? I have to send some commands to the remote host and parse their answers. greatz Johannes http://www.lag.net/paramiko/ Another solution would be to use subprocess and/or pexpect -- http

SSH Connection with Python

2012-10-25 Thread Schneider
Hi Folkz, how can i create a SSH-Connection with python? I have to send some commands to the remote host and parse their answers. greatz Johannes -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing arguments to & executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2012-09-20 Thread Piet van Oostrum
Chris Rebert writes: > Use the `subprocess` module instead (with shell=False). You then won't > need to worry about escaping. > http://docs.python.org/library/subprocess.html You will still need to worry about escaping because on the remote end you invoke ssh which is a shell. Th

Re: Passing arguments to & executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2012-09-20 Thread Piet van Oostrum
Ismael Farfán writes: > How about something like this: > os.system ( 'ssh remoteuser@remote python remote.py "arg 1" "arg 2" "arg 3"' ) That won't work. You need an additional level of quoting because ssh is also a shell so it adds an

Re: Passing arguments to & executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2012-09-20 Thread Chris Rebert
he remote machine). > 3. Has anybody been able to do this using os.system ? > > I tried this >>>> import os >>>> os.system ("ssh remoteuser@remote python remote.py arg1 arg2 arg3") > > This worked, but if the arguments i tried to pass, had spaces, i was

Re: Passing arguments to & executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2012-09-20 Thread Emile van Sebille
On 9/19/2012 12:50 PM ashish said... Hi c.l.p folks Here is my situation 1. I have two machines. Lets call them 'local' & 'remote'. Both run ubuntu & both have python installed 2. I have a python script, local.py, running on 'local' which needs to pass arguments ( 3/4 string arguments, contai

Re: Passing arguments to & executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2012-09-19 Thread Tim Roberts
nts ( 3/4 string arguments, containing whitespaces like spaces, etc ) >to a python script, remote.py running on 'remote' (the remote machine). You haven't provided very many details, so it's possible ssh is the low-impact solution, but don't discard the possibility of usi

Re: Passing arguments to & executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2012-09-19 Thread Ismael Farfán
needs to pass > arguments ( 3/4 string arguments, containing whitespaces like spaces, etc ) > to a python script, remote.py running on 'remote' (the remote machine). > > I have the following questions: > > 1. What's the best way to accomplish my task ? >

Passing arguments to & executing, a python script on a remote machine from a python script on local machine (using ssh ?)

2012-09-19 Thread ashish
ning whitespaces like spaces, etc ) to a python script, remote.py running on 'remote' (the remote machine). I have the following questions: 1. What's the best way to accomplish my task ? I have researched quite a bit & pretty much everybody is using ssh. After googling a bu

fabric problem with ssh

2012-08-24 Thread Tim Arnold
7;) My console result: > fab lsfiles No hosts found. Please specify (single) host string for connection: localhost [localhost] run: ls -l ~/ [localhost] Passphrase for private key: ... file listing follows ... How can I get fabric to use my .ssh/known_hosts file? system details: Python 2

Re: Python Script Works Locally But Not Remotely with SSH

2012-04-08 Thread Jerry Hill
On Sat, Apr 7, 2012 at 5:41 PM, Dennis Lee Bieber wrote: >        The WinXP machine would need to have X-client translator (something > that redirects all the Windows native graphics into X protocol and ships > it to the specified server machine). > >        As I recall -- such are not cheap appli

Re: Python Script Works Locally But Not Remotely with SSH

2012-04-07 Thread Andrew Berg
On 4/7/2012 11:59 AM, goldtech wrote: I thought if I SSH > even from a Linux to a Windows machine whatever I say on the SSH > client command line would be the same as me doing a command on the > "DOS" command-line in Windows. I incorrectly thought SSH is just a > tunnel fo

  1   2   3   4   >