如何ssh到另外一台机器上执行程序

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

如何ssh到另外一台机器上执行程序

Jian Qin
我要ssh到192.168.0.77 上运行netcat , 并在6677端口上listen

import subprocess

alist = ['192.168.0.77', '6677']
subprocess.Popen(['ssh', blist[0]])

subprocess.Popen (['netcat', '-l', '-p', blist[1]])

现在可以ssh过去,但是没有运行netcat。有哪位知道该怎么做的吗?

_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jiahua Huang
用 rsh

On Jan 4, 2008 3:15 PM, Jian Qin <[hidden email]> wrote:

> 我要ssh到192.168.0.77 上运行netcat , 并在6677端口上listen
>
> import subprocess
>
> alist = ['192.168.0.77', '6677']
> subprocess.Popen(['ssh', blist[0]])
>
> subprocess.Popen (['netcat', '-l', '-p', blist[1]])
>
> 现在可以ssh过去,但是没有运行netcat。有哪位知道该怎么做的吗?
>
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jiahua Huang
In reply to this post by Jian Qin
你用过 ssh 的吧,

调用 ssh 命令的话,
用 os.popen2 打开 ssh,
向 ssh 进程写你的命令

i,o = os.popen2('ssh 192.168.0.77 -p 6667')
i.write('nc -l -p 6668\n')
i.flush()

On Jan 4, 2008 3:15 PM, Jian Qin <[hidden email]> wrote:

> 我要ssh到192.168.0.77 上运行netcat , 并在6677端口上listen
>
> import subprocess
>
> alist = ['192.168.0.77', '6677']
> subprocess.Popen(['ssh', blist[0]])
>
> subprocess.Popen (['netcat', '-l', '-p', blist[1]])
>
> 现在可以ssh过去,但是没有运行netcat。有哪位知道该怎么做的吗?
>
> _
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jiahua Huang
或者,你去看  python-paramiko 模块

On Jan 4, 2008 3:56 PM, Jiahua Huang <[hidden email]> wrote:
> 你用过 ssh 的吧,
>
> 调用 ssh 命令的话,
> 用 os.popen2 打开 ssh,
> 向 ssh 进程写你的命令
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jiahua Huang
import paramiko
t = paramiko.Transport(('192.168.0.77', 6667))
t.connect(username='YYYYYYY', password='XXXXXXX')
chan = t.open_session()
chan.get_pty()
chan.invoke_shell()
chan.send('nc -l -p 6668 \n')
print chan.recv(1024)


On Jan 4, 2008 3:59 PM, Jiahua Huang <[hidden email]> wrote:
> 或者,你去看  python-paramiko 模块
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

jessinio liang
呢个劲秋!!

收藏
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jian Qin
In reply to this post by Jiahua Huang
如果:
import os
i,o = os.popen2('ssh <a href="http://192.168.0.77" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> 192.168.0.77')

会报  "Pseudo-terminal will not be allocated because stdin is not a terminal"
google了一下,ssh -tt 可以解决。
但是ssh -tt 只对subprocess有用,对popen2不起作用,所以最后能用的代码是:

import subprocess
p = subprocess.Popen(['ssh', '-tt', '192.168.0.77'])
p.stdin.write('nc -l -vv -p 6666')

不管subprocess还是popen,调用ssh -tt时都会报
tcgetattr: Invalid argument错误, 但subprocess能继续执行,popen2则无响应

paramiko 模块不熟悉,报了个import error就没试了:)

2008/1/4, Jiahua Huang < [hidden email]>:
或者,你去看  python-paramiko 模块

On Jan 4, 2008 3:56 PM, Jiahua Huang < [hidden email]> wrote:
> 你用过 ssh 的吧,
>
> 调用 ssh 命令的话,
> 用 os.popen2 打开 ssh,
> 向 ssh 进程写你的命令
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to   [hidden email]
Detail Info: <a href="http://python.cn/mailman/listinfo/python-chinese" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://python.cn/mailman/listinfo/python-chinese


_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jiahua Huang
调用 ssh 是需要标准输入输出的,你用 subprocess.Popen() 只有输出,当然不能用。

你还是用 paramiko 模块吧,

python-paramiko 模块需要你自己安装。

On Jan 7, 2008 3:54 PM, Jian Qin <[hidden email]> wrote:

> 如果:
> import os
> i,o = os.popen2('ssh 192.168.0.77')
>
> 会报  "Pseudo-terminal will not be allocated because stdin is not a terminal"
> google了一下,ssh -tt 可以解决。
> 但是ssh -tt 只对subprocess有用,对popen2不起作用,所以最后能用的代码是:
>
> import subprocess
> p = subprocess.Popen(['ssh', '-tt', '192.168.0.77'])
> p.stdin.write('nc -l -vv -p 6666')
>
> 不管subprocess还是popen,调用ssh -tt时都会报
> tcgetattr: Invalid argument错误, 但subprocess能继续执行,popen2则无响应
>
> paramiko 模块不熟悉,报了个import error就没试了:)
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

shhgs
I recommend pxssh.


On Jan 7, 2008 3:45 AM, Jiahua Huang <[hidden email]> wrote:

> 调用 ssh 是需要标准输入输出的,你用 subprocess.Popen() 只有输出,当然不能用。
>
> 你还是用 paramiko 模块吧,
>
> python-paramiko 模块需要你自己安装。
>
> On Jan 7, 2008 3:54 PM, Jian Qin <[hidden email]> wrote:
> > 如果:
> > import os
> > i,o = os.popen2('ssh 192.168.0.77')
> >
> > 会报  "Pseudo-terminal will not be allocated because stdin is not a terminal"
> > google了一下,ssh -tt 可以解决。
> > 但是ssh -tt 只对subprocess有用,对popen2不起作用,所以最后能用的代码是:
> >
> > import subprocess
> > p = subprocess.Popen(['ssh', '-tt', '192.168.0.77'])
> > p.stdin.write('nc -l -vv -p 6666')
> >
> > 不管subprocess还是popen,调用ssh -tt时都会报
> > tcgetattr: Invalid argument错误, 但subprocess能继续执行,popen2则无响应
> >
> > paramiko 模块不熟悉,报了个import error就没试了:)
> >
>
> _______________________________________________
> python-chinese
> Post: send [hidden email]
> Subscribe: send subscribe to [hidden email]
> Unsubscribe: send unsubscribe to  [hidden email]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

jiyong wu
In reply to this post by Jian Qin
在终端上,我常用命令:
ssh -luser host "command"
在主机host执行一个命令。

如果不需要输入密码,或许可以这么做:
os.popen('ssh -t user@host "command"')


On  4, Jian Qin <[hidden email]> wrote:

> 如果:
> import os
> i,o = os.popen2('ssh 192.168.0.77')
>
> 会报  "Pseudo-terminal will not be allocated because stdin is not a terminal"
> google了一下,ssh -tt 可以解决。
> 但是ssh -tt 只对subprocess有用,对popen2不起作用,所以最后能用的代码是:
>
> import subprocess
> p = subprocess.Popen(['ssh', '-tt', '192.168.0.77'])
> p.stdin.write('nc -l -vv -p 6666')
>
> 不管subprocess还是popen,调用ssh -tt时都会报
> tcgetattr: Invalid argument错误,但subprocess能继续执行,popen2则无响应
>
> paramiko 模块不熟悉,报了个import error就没试了:)
>
> 2008/1/4, Jiahua Huang < [hidden email] >:
>
>     或者,你去看  python-paramiko 模块
>
>     On Jan 4, 2008 3:56 PM, Jiahua Huang < [hidden email]> wrote:
>     > 你用过 ssh 的吧,
>     >
>     > 调用 ssh 命令的话,
>     > 用 os.popen2 打开 ssh,
>     > 向 ssh 进程写你的命令
>     >
>     _______________________________________________
>     python-chinese
>     Post: send [hidden email]
>     Subscribe: send subscribe to [hidden email]
>     Unsubscribe: send unsubscribe to   [hidden email]
>     Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>

> _______________________________________________
> python-chinese
> Post: send [hidden email]
> Subscribe: send subscribe to [hidden email]
> Unsubscribe: send unsubscribe to  [hidden email]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jian Qin
In reply to this post by Jiahua Huang
奇怪的输出:
import paramiko
t = paramiko.Transport('172.30.137.13')
t.connect(username='', password='')
chan = t.open_session()
 
chan.get_pty()
chan.invoke_shell ()
chan.send('ls \n')
print chan.recv(1024)
这个打印出来的是ls的输出

如果改为
import paramiko
t = paramiko.Transport('172.30.137.13')
t.connect(username='qinjian', password='oldqinoldqin')
chan = t.open_session()
 
chan.exec_command('ls \n')
print chan.recv(1024)
打印出来的内容是
Last login: Thu Jan 10 17:07:06 2008 from 172.30.137.43

不知道是什么原因?

在08-1-7,Jiahua Huang <[hidden email]> 写道:
调用 ssh 是需要标准输入输出的,你用 subprocess.Popen() 只有输出,当然不能用。

你还是用 paramiko 模块吧,

python-paramiko 模块需要你自己安装。

On Jan 7, 2008 3:54 PM, Jian Qin <[hidden email]> wrote:
> 如果:
> import os
> i,o = os.popen2('ssh 192.168.0.77')
>
> 会报  "Pseudo-terminal will not be allocated because stdin is not a terminal"
> google了一下,ssh -tt 可以解决。

> 但是ssh -tt 只对subprocess有用,对popen2不起作用,所以最后能用的代码是:
>
> import subprocess
> p = subprocess.Popen(['ssh', '-tt', '192.168.0.77 '])
> p.stdin.write('nc -l -vv -p 6666')
>
> 不管subprocess还是popen,调用ssh -tt时都会报
> tcgetattr: Invalid argument错误, 但subprocess能继续执行,popen2则无响应
>
> paramiko 模块不熟悉,报了个import error就没试了:)
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese


_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jiahua Huang
这个是 ssh 登录的提示文字啊,
你继续读

On Jan 10, 2008 5:12 PM, Jian Qin <[hidden email]> wrote:
> print chan.recv(1024)
> 打印出来的内容是
> Last login: Thu Jan 10 17:07:06 2008 from 172.30.137.43
>
> 不知道是什么原因?
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

searun
In reply to this post by shhgs
这个不是跨平台的。
On 1/8/08, shhgs <[hidden email]> wrote:

> I recommend pxssh.
>
>
> On Jan 7, 2008 3:45 AM, Jiahua Huang <[hidden email]> wrote:
> > 调用 ssh 是需要标准输入输出的,你用 subprocess.Popen() 只有输出,当然不能用。
> >
> > 你还是用 paramiko 模块吧,
> >
> > python-paramiko 模块需要你自己安装。
> >
> > On Jan 7, 2008 3:54 PM, Jian Qin <[hidden email]> wrote:
> > > 如果:
> > > import os
> > > i,o = os.popen2('ssh 192.168.0.77')
> > >
> > > 会报  "Pseudo-terminal will not be allocated because stdin is not a terminal"
> > > google了一下,ssh -tt 可以解决。
> > > 但是ssh -tt 只对subprocess有用,对popen2不起作用,所以最后能用的代码是:
> > >
> > > import subprocess
> > > p = subprocess.Popen(['ssh', '-tt', '192.168.0.77'])
> > > p.stdin.write('nc -l -vv -p 6666')
> > >
> > > 不管subprocess还是popen,调用ssh -tt时都会报
> > > tcgetattr: Invalid argument错误, 但subprocess能继续执行,popen2则无响应
> > >
> > > paramiko 模块不熟悉,报了个import error就没试了:)
> > >
> >
> > _______________________________________________
> > python-chinese
> > Post: send [hidden email]
> > Subscribe: send subscribe to [hidden email]
> > Unsubscribe: send unsubscribe to  [hidden email]
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> _______________________________________________
> python-chinese
> Post: send [hidden email]
> Subscribe: send subscribe to [hidden email]
> Unsubscribe: send unsubscribe to  [hidden email]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

吴亮
searun wrote:

> 这个不是跨平台的。
> On 1/8/08, shhgs <[hidden email]> wrote:
>  
>> I recommend pxssh.
>>
>>
>> On Jan 7, 2008 3:45 AM, Jiahua Huang <[hidden email]> wrote:
>>    
>>> 调用 ssh 是需要标准输入输出的,你用 subprocess.Popen() 只有输出,当然不能用。
>>>
>>> 你还是用 paramiko 模块吧,
>>>
>>> python-paramiko 模块需要你自己安装。
>>>
>>> On Jan 7, 2008 3:54 PM, Jian Qin <[hidden email]> wrote:
>>>      
>>>> 如果:
>>>> import os
>>>> i,o = os.popen2('ssh 192.168.0.77')
>>>>
>>>> 会报  "Pseudo-terminal will not be allocated because stdin is not a terminal"
>>>> google了一下,ssh -tt 可以解决。
>>>> 但是ssh -tt 只对subprocess有用,对popen2不起作用,所以最后能用的代码是:
>>>>
>>>> import subprocess
>>>> p = subprocess.Popen(['ssh', '-tt', '192.168.0.77'])
>>>> p.stdin.write('nc -l -vv -p 6666')
>>>>
>>>> 不管subprocess还是popen,调用ssh -tt时都会报
>>>> tcgetattr: Invalid argument错误, 但subprocess能继续执行,popen2则无响应
>>>>
>>>> paramiko 模块不熟悉,报了个import error就没试了:)
>>>>
>>>>        
>>> _______________________________________________
>>> python-chinese
>>> Post: send [hidden email]
>>> Subscribe: send subscribe to [hidden email]
>>> Unsubscribe: send unsubscribe to  [hidden email]
>>> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>>>      
>> _______________________________________________
>> python-chinese
>> Post: send [hidden email]
>> Subscribe: send subscribe to [hidden email]
>> Unsubscribe: send unsubscribe to  [hidden email]
>> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>>    
> _______________________________________________
> python-chinese
> Post: send [hidden email]
> Subscribe: send subscribe to [hidden email]
> Unsubscribe: send unsubscribe to  [hidden email]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
大家有没有现成的关于使用paramiko进行ssh和scp的代码,
有的话发一个给我参考一下吧,
我给写一个关于ssh的脚本,
谢谢了

_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese

garcia_relax.vcf (324 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

atyu30 atyu30
In reply to this post by Jian Qin
使用公钥认证就可以了

在08-1-4,Jian Qin <[hidden email]> 写道:
我要ssh到192.168.0.77 上运行netcat , 并在6677端口上listen

import subprocess

alist = ['<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.0.77/" target="_blank"> 192.168.0.77', '6677']
subprocess.Popen(['ssh', blist[0]])

subprocess.Popen (['netcat', '-l', '-p', blist[1]])

现在可以ssh过去,但是没有运行netcat。有哪位知道该怎么做的吗?

_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://python.cn/mailman/listinfo/python-chinese" target="_blank">http://python.cn/mailman/listinfo/python-chinese


_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jiahua Huang
In reply to this post by 吴亮
她自带的文档和示例里就有……

2008/1/15 吴亮 <[hidden email]>:
> 大家有没有现成的关于使用paramiko进行ssh和scp的代码,
> 有的话发一个给我参考一下吧,
> 我给写一个关于ssh的脚本,
> 谢谢了
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jian Qin
In reply to this post by 吴亮
原来Jiahua Huang给的例子,照这个做就可以了。不过我的程序实现的是ssh到指定的主机上去netcat监听,然后再起一个sender.py向指定的主机
发送信息,通过信息是否收到和正确来判断gateway上的iptables是否正确有效。用chan.send()总有点问题,可能是我没设置正确,所以我用的是
chan.exec_command()
你可以先看看
paramiko的文档

import paramiko
t = paramiko.Transport(('<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://192.168.0.77/" target="_blank"> 192.168.0.77', 6667))
t.connect(username='YYYYYYY', password='XXXXXXX')
chan = t.open_session()
chan.get_pty()
chan.invoke_shell()
chan.send('nc -l -p 6668 \n')
print chan.recv (1024)

在08-1-15,吴亮 <[hidden email]> 写道:
__________
> python-chinese
> Post: send [hidden email]
> Subscribe: send subscribe to [hidden email]
> Unsubscribe: send unsubscribe to  [hidden email]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
大家有没有现成的关于使用paramiko进行ssh和scp的代码,
有的话发一个给我参考一下吧,
我给写一个关于ssh的脚本,
谢谢了

_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese



_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jiahua Huang
In reply to this post by 吴亮
另外, scp 之类可以用 sftp 代替,
( sftp 就是 ssh 服务,而不是 ftp )

2008/1/15 吴亮 <[hidden email]>:
> 大家有没有现成的关于使用paramiko进行ssh和scp的代码,
> 有的话发一个给我参考一下吧,
> 我给写一个关于ssh的脚本,
> 谢谢了
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

cougar cougar
我一直以为sftp是ftp加个安全层,原来不是啊
 
sftp和scp啥区别呢?
 

cougar2008
2008-01-16

发件人: Jiahua Huang
发送时间: 2008-01-16 12:07:19
收件人: [hidden email]
抄送:
主题: Re: [python-chinese]如何ssh到另外一台机器上执行程序
 
另外, scp 之类可以用 sftp 代替,
( sftp 就是 ssh 服务,而不是 ftp )
 
2008/1/15 吴亮  <[hidden email] >:
> 大家有没有现成的关于使用paramiko进行ssh和scp的代码,
> 有的话发一个给我参考一下吧,
> 我给写一个关于ssh的脚本,
> 谢谢了
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]

_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
Reply | Threaded
Open this post in threaded view
|

Re: 如何ssh到另外一台机器上执行程序

Jiahua Huang
sftp 可以看作是更方便的 scp,
lftp、nautilus 之类可以直接打开 sftp://

2008/1/16 cougar2008 <[hidden email]>:
>
> 我一直以为sftp是ftp加个安全层,原来不是啊
>
> sftp和scp啥区别呢?
>
_______________________________________________
python-chinese
Post: send [hidden email]
Subscribe: send subscribe to [hidden email]
Unsubscribe: send unsubscribe to  [hidden email]
Detail Info: http://python.cn/mailman/listinfo/python-chinese
12