局方提供了一份安全扫描文件,提示两台服务器的openssh有漏洞,需要修补漏洞,鉴于此,更新系统的openssh到最新版本。
我们的服务器一般都是使用rhel 6.X x64的操作系统。
局方提供了一份安全扫描文件,提示两台服务器的openssh有漏洞,需要修补漏洞,鉴于此,更新系统的openssh到最新版本。
我们的服务器一般都是使用rhel 6.X x64的操作系统。
This’s a article show you howto use pubkey authtication under CentOS. Ok, let’s continue.
First, we need enable Pubkey Authtication.
vi /etc/ssh/sshd_config
uncomment and modify these lines below:
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
Do you know that you can create your own socks5 proxy with just one command:
ssh -f -N -D 5050 "USERNAME"@SSHserver.com
-f -N option is just to run ssh in background, the important option is -D.
from FreeBSD SSH(1) man:
-D [bind_address:]port
假设要以用户 rainux 的身份登录运行 OpenSSH Server 的远程主机 www.rainux.org(现在几乎所有的 Linux 服务器都使用 OpenSSH Server 作为 SSH Server),那么需要做的操作如下:
1.生成用于 SSH 身份认证的密钥。密钥由公钥和私钥组成,一个公钥只对应一个私钥,一个私钥也只对应一个公钥。
2.将 OpenSSH 格式的公钥文本追加到远程主机上的 ~/.ssh/authorized_keys
文件里(~ 意为用户 rainux 的 HOME 目录)。注意公钥文本中应该没有换行符,一行就是一个公钥。
3.确保 ~/.ssh/authorized_keys
权限为 600,~/.ssh
目录权限为 700,并且它们的所有者都是 rainux。
4.指定 SSH 客户端使用对应的私钥并以用户 rainux 的身份登录 www.rainux.org,此时无需输入 rainux 在 www.rainux.org 上的密码。
继续阅读基于公钥认证方式的 OpenSSH Server 自动登录完全手册