zoukankan      html  css  js  c++  java
  • 安装 ssh 的公开密匙到 iPhone 上

    1). 在Mac的终端上产生密匙

    ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key (/home/xxxx/.ssh/id_rsa):
    Created directory '/home/xxxx/.ssh'.
    Enter passphrase (empty for no passphrase): xxx
    Enter same passphrase again: xxx
    Your identification has been saved in /home/xxxx/.ssh/id_rsa.
    Your public key has been saved in /home/xxxx/.ssh/id_rsa.pub.
    The key fingerprint is:
    e4:e8:b7:05:06:b3:f0:ff:af:13:fc:50:6a:5b:d1:b5 xxxx@localhost.localdomain
    过程中会提问你通行证(passphrase),输入你常用的秘密。
     
    2). 在 iPhone 上创建.ssh目录(iPhone的IP地址是10.0.2.2)
    ssh root@10.0.2.2 'mkdir -p .ssh'
    如果问道你iPhone root password,输入 alpine。
    3). 拷贝刚才生成的公开密匙到 iPhone
    cat ~/.ssh/id_rsa.pub | ssh root@10.0.2.2 'cat >> .ssh/authorized_keys'
    如果问道你iPhone root password,输入 alpine。
    4). 在 iPhone 上编辑 /etc/ssh/sshd_config 文件
    #将
    
    #StrictModes yes
    #PubkeyAuthentication yes
    #AuthorizedKeysFile .ssh/authorized_keys
    
    #替换为
    
    StrictModes no
    PubkeyAuthentication yes
    AuthorizedKeysFile .ssh/authorized_keys
    5). 重新启动iPhone,OK!
     
     
    by sschu
     
  • 相关阅读:
    Unity-国际版下载
    Js数值处理
    Vue,部署通过Url指向dist里的index, 通过IIS 7.0及以上部署,添加 注册托管代码模块
    反编译
    Node 命令
    VUE开发命令
    VS2017发布到部署网站
    谷歌浏览器提示您的连接不是私密连接
    iis,配置
    VS开发android
  • 原文地址:https://www.cnblogs.com/ydhliphonedev/p/2739999.html
Copyright © 2011-2022 走看看