Windows login to Ubuntu via SSH

  • Generate windows public key

    Execute in CMD of windows: SSH keygen -t RSA, and enter directly during the execution.
    After execution, it will be displayed in c:\users\xxx\ The following three files are generated in the SSH folder:
    id_ RSA is the local private key
    id_ rsa. Pub is a public key
    known_ Hosts is a known IP
  • Upload windows public key to Ubuntu

    Add c:\users\xxx\ ssh\id_ rsa. Pub copy to ~/. of Ubuntu SSH. (via SCP)
    Then execute in Ubuntu: cat ~/ ssh/id_ rsa. pub >> ~/. ssh/authorized_ keys
  • modify attribute

    sudo chmod 600 authorized_keys
    sudo chmod 700 ~/.ssh
  • Modify /etc/ssh/sshd of Ubuntu_ config

    sudo vim /etc/ssh/sshd_config
    add to
    RSAAuthentication yes
    PubkeyAuthentication yes
    PasswordAuthentication no
  • Restart SSH

    sudo service sshd restart
  • Verify password free login

    Validate: SSH in CMD of windows [email protected] :p
    If no password is prompted, the configuration is successful.

Recommended Today

P3120 [USACO15FEB]Cow Hopscotch G

portal ideas A simple idea is a\(O(n^2m^2)\)transfer of: \[f_{i,j}=\sum_{x=1}^{i-1}\sum_{y=1}^{j-1}f_{x,y}*[a_{i,j}!=a_{x,y}] \] There are so many constraints, thinking about using cdq divide and conquer to optimize we consider theRowdivide and conquer\([l,mid]\) Then brute force enumerationList,use\([l,mid]\)to update\((mid,r]\) enumerate columns each time\(j\)After the transfer, the\(\sum_{i=l}^{mid}f_{i,j}\)add to\(sum\), and update\(s[a_{i,j}]\)(used to subtract the contribution of the same number) The equation for […]