All of the company's office computers are MacBook, because this cock has not been used before Mac computer (poor forced a), just started to use the feeling and Windows very different, but after a period of time really found that the system is very convenient to use, And most of all I feel comfortable is the MAC system and Linux system commands almost, after all, the teacher out of the same.
Gossip less said, because operations need to log in from time to time server, make a virtual machine or something, SSH is often to use, but each time ssh up need to enter a large number of passwords, the company server password and so complex, so I really is a big head, so want to set up an SSH key on their own computer, This makes it possible to enter the password every time. Everything seems so good, because Mac and Linux commands are basically the same, so this cock is very happy in the Mac command line to knock a Ssh-keygen command, you don't say, there is this command, and then a return to the car with lightning, a public key was born, followed by, Ben is very handsome hit a ssh-c, and then desperately pressing the TAB key, but this time this cock dumbfounded, I wipe class, no Ssh-copy-id command Ah, this is how the whole ah?
This dick very calm open Baidu then Google a bit, found that we need to manually upload public key files Ah, I wipe class, how so not humane, obviously a command on the matter of the whole so troublesome.
So, I first in the root directory of the Mac into the. ssh/file directory, and then find id_rsa.pub this file, use the SCP command to upload this file on the server you want to log on the/root/.ssh/directory, and rename this file to Authorized_keys , and then it's done, so you don't have to lose a long string of passwords again.
This article is from the "Cigarette Butts Webmaster" blog, please be sure to keep this source http://8838848.blog.51cto.com/8828848/1570269
Implement password-free SSH login server under Mac system