paramiko是python(2.2或更高)的模块,遵循SSH2协议实现了安全(加密和认证)连接远程机器。
安装所需软件包:
首先要安装好python
Python-2.6.5.tar.bz2
wget http://www.python.org/ftp/python/2.6.5/Python-2.6.5.tar.bz2
tar -jxvf Python-2.6.5.tar.bz2
cd Python-2.6.5
./configure --prefix=/usr/local/python
make; make install
vi /etc/profile
PATH=/usr/local/python/bin:$PATH
source /etc/profile
http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.5.tar.gz
http://www.lag.net/paramiko/download/paramiko-1.7.7.1.tar.gz
tar zxvf pycrypto-2.5.tar.gz
cd pycrypto-2.5
python setup.py build
python setup.py install
tar zxvf paramiko-1.7.7.1.tar.gz
cd paramiko-1.7.7.1
python setup.py build
python setup.py install
error: command 'gcc' failed with exit status 1 的解决办法
yum install gcc python-devel
yum install openssl*
后面运行后报/usr/local/python/lib/python2.6/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning)
后来我是这样处理的。
查了一下libgmp属于哪个,经过查询是gmp这个包。
再把自带的rpm -e gmp-4.2版本删除。
删除后去下载了一个wget http://ftp.gnu.org/gnu/gmp/gmp-5.0.5.tar.bz2
然后编译,安装了一下。就没有再出现那样的错误
相关报错:
File "1.py", line 4, in <module>
line = file.realine()
AttributeError: 'file' object has no attribute 'realine'
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c10.tar.gz#md5=30f822f19b02c3082cb1ba1d69be35dd
tar zxvf setuptools-0.6c10.tar.gz
cd setuptools-0.6c10
python setup.py build
python setup.py install
wget http://pypi.python.org/packages/source/r/readline/readline-6.2.2.tar.gz#md5=ad9d4a5a3af37d31daf36ea917b08c77
python setup.py build
python setup.py install