Skip to content

Instantly share code, notes, and snippets.

@lanrion
Created April 29, 2014 09:46
Show Gist options
  • Select an option

  • Save lanrion/11395545 to your computer and use it in GitHub Desktop.

Select an option

Save lanrion/11395545 to your computer and use it in GitHub Desktop.
添加本地ssh key 到远程机器上。

1, 生成ssh-key:

ssh-keygen -t rsa

2, 添加到远程机器:

cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment