Mac build git server-open SSH

Source: Internet
Author: User
Tags ssh access ssh server

SSH OpenEnabling SSH access in OSX is simple, just open system preferences and tap the share icon. check box is selected to allow remote login. When the server is in this state, it is two choices, can log on to all users remotely, and can log in remotely to a specified user. To create a new git user, simply go back to "System Preferences" and click on the "Users and Groups" icon. As shown, click Add below the list and fill in the new user's detail. Then just allow remote access to Git users as shown. a simple testClient: The login format is SSH [email protected] Server machine name, will be asked whether to add this host to allow the address, continue, enter the password can be remote login to the server. more secure SSH (RSA)Experiment Three machines:
    • Ubuntu, as the first experimental machine
          "1" Ubuntu input:         >SSH-KEYGEN-T rsa          Do not set a password. By default there will be a file ~/.ssh/id_rsa.pub under ~/.ssh.         "2" It is now assumed that the server side has never been configured to become an SSH server, so there is no natural. SSH directory and Authorized_keys file. So Ubuntu under input:          >SSH [email protected] Server machine name mkdir .ssh          >SCP ~/.ssh/id_rsa.pub [email protected]:.ssh/authorized_keys        " 3 "Now re-cut back to server machine work:          >cd/etc          >chmod 666 sshd_config            >vim sshd_config          Edit the following:      & nbsp   Modify #permitrootlogin Yes Permitrootlogin no          Remove #      &NBSP in front of the next few statements ;   #RSAAuthentication yes          #PubkeyAuthentication yes       &NBSP ; &nbsP #AuthorizedKeysFile      .ssh/authorized_keys                     #PasswordAuthentication no          #PermitEmptyPasswords no& nbsp         Last modified #userpam Yes Usepam no        "4" Logout of Ubuntu user and re-login, run SSH [email p Rotected] Server machine name, do not need a password to login.
    • OSX, as the second experimental machine.
"1" OSX input: >ssh-keygen-t RSA does not set the password.       By default there will be a file ~/.ssh/id_rsa.pub under ~/.ssh. "2" due to the operation of the first experimental machine, currently can not directly use the user name password remote login. So copy the id_rsa.pub to the server and add its contents to the Authorized_keys file on the server, and the test passes.
    • Windows, as a third experimental machine
"1" Cygwin or MinGW. Where Cygwin needs to be installed OPENSSH,MINGW need to install Msys. In the Cygwin or Msys console input ssh-keygen-t RSA "2" with the second step of OSX, the difference is sometimes Windows system DNS parsing some problems, so if unable to log in, you can [email protected] can be entered after the IP address Experiment. Reference:
    • http://blog.smitec.net/posts/setting-up-a-git-server-on-osx/

Reprint: http://www.cnblogs.com/whj198579/archive/2013/04/09/3009350.html

Mac build git server-open SSH

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.