From 165805ca28f9d2adba1397388efff8d179c68245 Mon Sep 17 00:00:00 2001 From: nick Date: Mon, 24 Dec 2018 22:05:54 +0800 Subject: [PATCH] :memo: add --- Introduction.md | 7 +++++++ tool.md | 4 +++- used-settings.md | 11 +++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Introduction.md b/Introduction.md index 0217fe2..5421809 100644 --- a/Introduction.md +++ b/Introduction.md @@ -10,6 +10,13 @@ 无论是源码编译安装还是通过包管理器 `yum` 或 `apt-get` 安装的软件,默认都是需要设置开机自启动,单纯的启动服务,如果服务器有重启的话,程序无法运行,还要登录服务器排查原因,费事费力。 +## `Linux` 与 `Windows` 最大的区别 + +1. 名称区分大小写 +2. 系统路径 +3. 文件权限 +4. 一切皆文件 + ## 关于 Linux 命令的几个分类 - 内置命令 diff --git a/tool.md b/tool.md index bfc721e..51ba919 100644 --- a/tool.md +++ b/tool.md @@ -19,4 +19,6 @@ - __`namp` 网络嗅探工具__ -- __`sqlmap` 数据库扫描工具__ \ No newline at end of file +- __`sqlmap` 数据库扫描工具__ + +- __`ssh-copy-id`__ 公私钥快捷上传工具 \ No newline at end of file diff --git a/used-settings.md b/used-settings.md index 72c71a5..dd38825 100644 --- a/used-settings.md +++ b/used-settings.md @@ -5,6 +5,15 @@ ssh-keygen -t rsa #生成的公钥匙在 ~/.ssh/ 目录下 ``` 第二步,把公钥上传到服务器端,登录服务器追加公钥到 authorized_keys 文件 + +__简单版__ + +``` +ssh-copy-id -i ~/.ssh/id_rsa.pub username@ip +``` + +__复杂版__ + ``` scp id_rsa.pub root@ip地址:文件保存路径 ssh root@ip #登录服务器 @@ -14,6 +23,8 @@ cat id_rsa.pub >> /root/.ssh/authorized_keys 追加到文件中 ``` > 如果 .shh 目录或 authorized_keys 文件不存在需要自己新建 + + 第三步,修改服务器端 ssh 配置文件 /etc/ssh/sshd_config ```