开发者

script for mounting an iso on another server

i need to mount a iso on another lin开发者_JS百科ux system

is there any way to send mount command to the linux system?

Thanks


SSH seems to be your best bet. Although I have never used it, http://commandline.org.uk/python/sftp-python-really-simple-ssh/ seems to be a good option.

import ssh
s = ssh.Connection('[Target Machine]')
s.execute('mount -o loop [ISO File] [Mount Point]')
s.close()


import subprocess
subprocess.call(['ssh', 'user@host', 'mount', '-o', 'loop', '-t', 'iso9660', '<isofilename>', '<mountpoint>'])
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜