From 9f3e0d4e2145dd4196cd08b1527aa951f024ec36 Mon Sep 17 00:00:00 2001 From: Junv Zhao Date: Mon, 6 Jan 2020 00:01:03 +1100 Subject: [PATCH] Add linux auth without password --- categories/devops/linux.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/categories/devops/linux.md b/categories/devops/linux.md index cbb0dc8..98ff8af 100644 --- a/categories/devops/linux.md +++ b/categories/devops/linux.md @@ -7,6 +7,18 @@ Do not use default `22` port ```bash ssh user@ip -p 22222 ``` + +Login without password + +```bash +# adds private key identities to the authentication agent +ssh-add ~/.ssh/id_rsa + +# use locally available keys to authorise logins on a remote machine + +ssh-copy-id user@ip -p 22222 +``` + ### IP table ### Cron job