zoukankan      html  css  js  c++  java
  • linux 配置secureCRT过程

    root的配置过程如下:
    在Windows客户机上生成密钥对,其中Identity就是私钥文件,Identity.pub这是公钥文件.

    #vi/usr/local/etc/sshd_config[/align]
    做如下修改:

    PasswordAuthenticationno(关闭口令认证)

    PubkeyAuthenticationyes(开启公钥认证)   
    AuthorizedKeysFile.ssh/authorized_keys(认证公钥文件位置)

    #mkdir/root/.ssh(新建/root目录下的.ssh文件夹)
    #chmod700/root/.ssh(修改.ssh文件夹的用户权限)
    #ssh-keygen -i -f Identity.pub >> /root/.ssh/authorized_keys  还得转换一下。如果同为LINUX则不需要转换。

    #chmod 600 authorized_keys
    root用户可使用公钥正常连接。用相同的步骤来做普通用户(gyp334)的认证是则报“以服务器方式的公钥验证对于用户gyp334失败。请校验用户名和公/私钥对。”,重新输入用户名,选择公钥后还是报同样的错误,/var/log/secure中信息记录为“Mar 13 23:51:48 centos sshd[17081]: Received disconnect from 192.168.26.98: 13: \347\224\250\346\210\267\345\267\262\345\217\226\346\266\210\351\252\214\350\257\201\343\200\202”。清除本机中.ssh\known hosts的内容后再次连接,还是报同样的信息。
    另附sshd_config:
    Protocol 22
    SyslogFacility AUTHPRIV
    PubkeyAuthentication yes
    AuthorizedKeysFile      ~/.ssh/authorized_keys
    PasswordAuthentication no
    ChallengeResponseAuthentication no
    GSSAPIAuthentication yes
    GSSAPICleanupCredentials yes
    AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
    AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
    AcceptEnv LC_IDENTIFICATION LC_ALL
    X11Forwarding yes





  • 相关阅读:
    Leetcode Reverse Words in a String
    topcoder SRM 619 DIV2 GoodCompanyDivTwo
    topcoder SRM 618 DIV2 MovingRooksDiv2
    topcoder SRM 618 DIV2 WritingWords
    topcoder SRM 618 DIV2 LongWordsDiv2
    Zepto Code Rush 2014 A. Feed with Candy
    Zepto Code Rush 2014 B
    Codeforces Round #245 (Div. 2) B
    Codeforces Round #245 (Div. 2) A
    Codeforces Round #247 (Div. 2) B
  • 原文地址:https://www.cnblogs.com/firmy/p/2310290.html
Copyright © 2011-2022 走看看