2023年6月

1)全局开启SSH服务,并制定SSH的版本
Ruijie>enable 
Ruijie#configure terminal
Ruijie(config)#enable service ssh-server    ------>开启SSH服务,默认关闭
Ruijie(config)#ip ssh version 2               ------>默认1.99版本,设置为版本2

2)添加登陆的用户名和密码
Ruijie(config)#username ruijie password ruijie

3)生成加密密钥:
Ruijie(config)#crypto key generate rsa  ------>加密方式有两种:DSA和RSA,已RSA为例
Choose the size of the key modulus in the range of 360 to 2048 for your
Signature Keys. Choosing a key modulus greater than 512 may take
a few minutes.

How many bits in the modulus [512]:    ------>指定加密的位数即加密强度,默认是512位
% Generating 512 bit RSA1 keys ...[ok]
% Generating 512 bit RSA keys ...[ok]

4)在VTY线程下调用
Ruijie(config)#lin vty 0 4
Ruijie(config-line)#password ruijie    ------>设置登陆密码为ruijie
Ruijie(config-line)# login                    
应修改为如下:
Ruijie(config-line)# login   local
Ruijie(config-line)#transport input ssh     ------>设置传输模式是SSH,设置远程登入只允许使用SSH登入,不能使用telnet登入
         5)保存配置
       Ruijie(config-line)#end          ------>退出到特权模式
Ruijie#write                   ------>确认配置正确,保存配置

三、验证命令
Ruijie#show ip ssh             查看SSH的参数信息(版本信息,重认证次数等参数)
SSH Enable - version 2.0
Authentication timeout: 120 secs; Authentication retries: 3
Ruijie#show ssh                查看SSH的在线用户信息(加密算法,状态,用户名等消息)
Connection Version Encryption       Hmac         State           Username
         0     2.0 aes256-cbc       hmac-sha1    Session started   ruijie

 

https://www.cnblogs.com/ruijieer/p/16868774.html

 

docker unbutun 安装python和opencv


1. https://github.com/php-opencv/php-opencv-examples/tree/master/docker/ubuntu_php-8.2
    
2. docker build .

3. docker run -it -v /root/php-opencv-examples:/root/php-opencv-examples image

4. 进入容器
    apt-get install python3
    apt-get install python3-pip
    apt install libgl1-mesa-glx

    https://blog.csdn.net/weixin_44756050/article/details/104825269
    https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/opencv-python/
    下载对应版本的opencv

    pip install /home/xxx/opencv_python-3.4.9.31-cp36-cp36m-manylinux1_x86_64.whl

 

 

mac 安装cv2

pip3 install opencv-python