Articles of ssh

SSH jumphost / jumpserver的安全优势

我想了解更多关于强化Web服务器的知识,并且停止了Jumphost这个话题。 所以对我来说,例如一个Jumphost通过VPN连接到一个networking服务器,并且是唯一一个通过VPN和SSH访问的服务器,所以通过SSH或者VPN使用未知IP的其他请求将通过iptables被阻止。 我是否理解Jumphost权利的概念还是我应该照顾的其他优势?

本地访问ssh服务器,拒绝远程连接

在这个问题上,我遇到了很多关于google / stack的文档。 但没有find任何解决scheme 我在我的局域网中有一个覆盆子pi ssh服务器,我想从互联网(外部局域网)ssh。 我可以在本地ssh(局域网),但如果SSH使用公共IP /开放端口(无论是从局域网/从我的办公室)它拒绝连接。 我的networking拓扑 – ISP ______(ethernet)> tpLink Router (port forwarded) ——— > raspberry pi (wifi connected with static ip) 我已经扫描了我的公共IP,因为port 22已closures,并find了开放的端口 PORT STATE SERVICE 179/tcp open bgp 2000/tcp open cisco-sccp 8291/tcp open unknown 所以我select了端口8291和8000,并将端口从tplink路由器转发到树莓ssh服务器的静态ip。 我可以用密码在本地轻松SSH入服务器。 但是当我的公网IP(从局域网/外部局域网使用腻子) ssh -v [email protected] -p 8291 or [email protected] port 8291 它会卡住": Local version string […]

为什么我不能使用密钥或密码login? 我该如何阻止?

我刚刚发现我可以login到我的服务器,只要我提供一个缺less的文件到SSH客户端! 我可以检查什么来找出为什么,我可以改变什么来阻止这种情况的发生? 使用缺less的文件login $ ssh -i ~/.ssh/x [email protected] Warning: Identity file /c/Users/G/.ssh/x not accessible: No such file or directory. Last login: Wed Aug 9 20:20:49 2017 from 192.168.15.250 user@server:~$ 未能使用无效的证书login $ ssh -i ~/.ssh/invalid.pem user@server Permission denied (publickey). 成功login $ ssh -i ~/.ssh/valid.pem user@server Last login: Wed Aug 9 20:21:07 2017 from 192.168.15.250 user@server:~$ 这些是我的/ […]

如何在IP地址被阻塞的networking上进行SSH连接?

我在networking上直接访问任何IP地址被阻止。 正因为如此,我什么都不能ssh到任何机器。 我如何绕过这个? 没有VPN工作,没有代理(又一个IP),没有SOCK5(再次需要SSH)正在工作。 我如何绕过这个? 即使当我ssh如:ssh [email protected]它不起作用,因为我认为mymachine.com首先parsing为IP,然后连接,被禁止。 和ssh:(在任何其他的互联网连接上工作正常)

在更新ssh之后,只有一个IP地址的rootlogin不起作用了

我已经在我的一台PC上configuration了ssh服务器,只允许一台电脑进行rootlogin。 这工作得很好,直到我更新ssh(目前,服务器正在运行Debian Jessie)。 这是我的sshd_config的样子: # Package generated configuration file # See the sshd_config(5) manpage for details # What ports, IPs and protocols we listen for Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key […]

SSH启动时崩溃

我的连接SSH到我的VPS不工作了,我检查了auth.log文件,发现这个: auth.log Jul 28 20:22:04 warp sshd[31257]: Accepted password for root from MY_IP port 49196 ssh2 Jul 28 20:23:01 warp CRON[31385]: pam_unix(cron:session): session opened for user root by (uid=0) Jul 28 20:23:01 warp CRON[31385]: pam_unix(cron:session): session closed for user root Jul 28 20:23:26 warp sshd[31411]: error: rexec of /usr/sbin/sshd failed: No such file or directory […]

SSH到个人VPS通过公司的networking后面的防火墙

我已经看到很多问题,主要是试图访问服务器在防火墙后面,但我试图find另一种方式,我的个人服务器不是,但我在工作,试图访问它在networking上在防火墙后面 在我的~/.ssh/config我目前有这个 Host * AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_rsa Host hostname HostName xxx.xxx.xx.xxx User username Port 2345 当我ssh到它它会卡住在这里: ➜ ~ ssh hostname -v OpenSSH_7.4p1, LibreSSL 2.5.0 debug1: Reading configuration data /Users/alialdallal/.ssh/config debug1: /Users/alialdallal/.ssh/config line 1: Applying options for * debug1: /Users/alialdallal/.ssh/config line 6: Applying options for hostname debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting […]

当命令返回不同于0的退出状态时,SSH连接自动closures

当我在我的VPS服务器上执行一个命令(例如:grep,cat,…),它返回非0的退出状态时,我的SSH连接会自动closures。 我不知道什么可能涉及这个问题… 你已经尝试过这样的问题吗? 任何build议? 因此,这个问题的演示: 1)我从我的电脑连接到我的VPS服务器:sylvain @ mycompute sylvain@mycomputer:~$ ssh myuser@vps-server Last login: Sat Sep 9 17:02:30 2017 from 11.22.33.44 myuser@vps-server:~$ 2)我创build一个脚本,从第一个参数获取退出状态: myuser@vps-server:~$ chmod u+x /tmp/test-exit-status.sh myuser@vps-server:~$ cat /tmp/test-exit-status.sh #!/bin/bash echo "Exit status will be '$1'." exit $1 3)当退出状态为0时 ,保持SSH连接: myuser@vps-server:~$ /tmp/test-exit-status.sh 0 Exit status will be '0'. myuser@vps-server:~$ 4)当退出状态不是0 (例如56)时,SSH连接会自动closures,在我的计算机上,SSH命令的退出状态是脚本的退出状态: myuser@vps-server:~$ /tmp/test-exit-status.sh 56 Exit […]

SSH RemoteForward使用共享的控制套接字失败

我的〜/ .ssh / config包含: ControlMaster auto ControlPath ~/.ssh/socket-%r@%h:%p Host hostname.example # TextMate rmate port RemoteForward :52698 localhost:52698 当我与主机build立初始连接时,它在~/[email protected]:22成功创build主套接字文件。 但是,当我打开一个新的terminal,并尝试进行第二次连接,我得到这个错误: $ ssh hostname.example mux_client_forward: forwarding request failed: remote port forwarding failed for listen port 52698 muxclient: master forward request failed ControlSocket /Users/lachlanhunt/.ssh/[email protected]:22 already exists, disabling multiplexing Warning: remote port forwarding failed for listen port 52698 但是,如果我在configuration文件中注释掉RemoteForward行,就能够成功地重新使用连接,使连接更快。 […]

Debian Stretch – OpenSSH版本的PCI合规性问题

我所关注的其中一台服务器未能通过PCI Compliance ASV扫描。 正在接受的警告是: The SSH server running on the remote host is affected by an information disclosure vulnerability. According to its banner, the version of OpenSSH running on the remote host is prior to 7.5. It is, therefore, affected by an information disclosure vulnerability : – An unspecified timing flaw exists in the CBC […]