-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
826 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
havee.me | ||
havee.me |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,24 +36,41 @@ tags: [Openssh, Usage] | |
|
||
#### 创建密钥对 | ||
|
||
推荐 ed25519,已在 OpenSSH 6.5 中加入支持 | ||
|
||
ssh-keygen -t ed25519 -C "[email protected]" | ||
ssh-keygen -t rsa -b 4096 -C "[email protected]" | ||
# 或 | ||
ssh-keygen -t ecdsa -b 521 -C "[email protected]" | ||
# 验证公钥指纹 | ||
ssh-keygen -E md5 -lf ~/.ssh/id_rsa.pub | ||
# 从私钥创建公钥 | ||
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub | ||
# 修改私钥口令 | ||
ssh-keygen -p -f ~/.ssh/id_dsa | ||
|
||
|
||
验证公钥指纹 | ||
|
||
ssh-keygen -E md5 -lf ~/.ssh/your_pubkey | ||
|
||
从私钥创建公钥 | ||
|
||
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/your_pubkey | ||
|
||
修改私钥口令 | ||
|
||
ssh-keygen -p -f ~/.ssh/your_pubkey | ||
|
||
#### 重新生成服务器密钥 | ||
|
||
rm -v /etc/ssh/ssh_host_* | ||
ssh-keygen -A | ||
systemctl restart ssh | ||
|
||
或者手动生成各自需要的服务器密钥 | ||
|
||
ssh-keygen -q -N "" -t ed25519 -f /etc/ssh/ssh_host_ed25519_key | ||
ssh-keygen -q -N "" -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key | ||
ssh-keygen -q -N "" -t ecdsa -b 521 -f /etc/ssh/ssh_host_ecdsa_key | ||
ssh-keygen -q -N "" -t dsa -b 1024 -f /etc/ssh/ssh_host_dsa_key | ||
ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key | ||
systemctl restart ssh | ||
# debian 用户可以用如下方式 | ||
|
||
debian 用户可以用如下方式 | ||
|
||
rm -v /etc/ssh/ssh_host_* | ||
dpkg-reconfigure openssh-server # debian | ||
systemctl restart ssh | ||
|
@@ -68,7 +85,7 @@ tags: [Openssh, Usage] | |
|
||
Host hostname | ||
IdentityFile ~/.ssh/your-private-key | ||
HostName ip | ||
HostName ip or domain | ||
Port port | ||
User username | ||
|
||
|
@@ -126,8 +143,6 @@ ssh-agent 一般人用不到,不过还是挺有用的,概念不介绍了。 | |
Protocol 2 | ||
Compression yes | ||
|
||
好了,当你 `ssh host1` 之后,可以登陆同样公钥的第三台机器了。 | ||
|
||
#### ProxyCommand | ||
|
||
不过,并不是所有的机子的公钥是一致的,但是有不得不使用其中一台作为跳板,那么我们就使用这个参数了 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
layout: post | ||
title: "SQLite 命令行程序说明" | ||
category: SQL | ||
category: Other | ||
tags: [SQLite, CLI, Usage] | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
layout: post | ||
title: "SQLite 命令" | ||
category: SQL | ||
category: Other | ||
tags: [SQLite, CLI, Usage] | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
layout: post | ||
title: "PHP SQLite 示例" | ||
category: SQL | ||
category: Other | ||
tags: [PHP, SQLite, Usage] | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
layout: post | ||
title: "PHP SQLite 函数库" | ||
category: SQL | ||
category: Other | ||
tags: [PHP, SQLite, Function] | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
layout: post | ||
title: "再次尝试 FreeBSD" | ||
category: "BSD" | ||
category: "Other" | ||
tags: [freebsd] | ||
--- | ||
|
||
|
Oops, something went wrong.