Articles of ssh

“pm2 deploy production setup”命令失败,权限被拒绝(publickey)

所以我猜pm2和SSH没有正确configuration在我的机器上相互工作。 我完全能够使用ssh user@hostname手动SSH到我的远程服务器。 服务器是运行Ubuntu 16.04的DigitalOcean服务器,如果这有所作为(我还是一个初学者,所以我不确定什么信息对于这个问题是重要的)。 命令和错误: jon@jon-AllSeries:~/Workspace/forumerly$ sudo pm2 deploy production setup –> Deploying to production environment –> on host 162.243.197.96 ○ hook pre-setup Permission denied (publickey). setup paths failed Deploy failed 我的ecos.config.js文件: module.exports = { /** * Application configuration section * http://pm2.keymetrics.io/docs/usage/application-declaration/ */ apps : [ // First application { name : 'forumerly', script […]

debian – 守护进程重装的sshd config中的HostKeyAlgorithms失败

我有一个Debian的Jessie服务器,我想validationDNS SSHFPlogging在服务器上的SSH密钥的指纹。 这工作正常,但如果客户端通过SSH连接到服务器,服务器提供了ssh-ecdsaalgorithm。 我想configurationssh守护进程,只有ssh-ed25519和ssh-rsa是支持的algorithm。 对于Ubuntu 16.04,我使用sshconfiguration密钥HostKeyAlgorithms但是如果我在Debian上使用这个密钥,我无法启动守护进程。 为什么守护进程不支持此configuration密钥,或者我必须使用其他configuration密钥来仅支持ssh-ed25519和ssh-rsaalgorithm? 在这里我的sshd_config AcceptEnv LANG LC_* AuthorizedKeysFile %h/.ssh/authorized_keys ChallengeResponseAuthentication no HostbasedAuthentication no HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key HostKey /etc/ssh/ssh_host_ecdsa_key HostKey /etc/ssh/ssh_host_ed25519_key #HostKeyAlgorithms ssh-ed25519,ssh-rsa KeyRegenerationInterval 3600 LoginGraceTime 120 LogLevel INFO MaxAuthTries 10 MaxSessions 5 PasswordAuthentication no PermitEmptyPasswords no PermitRootLogin without-password Port 22 PrintMotd no PrintLastLog no Protocol 2 RSAAuthentication no PubkeyAuthentication yes […]

Ubuntu – 在阻塞的端口上失败的日志logging尝试(SSH不监听这些端口)

我正在检查sshd失败的日志logging。 令我吃惊的是,我看到随机的端口和正在由sshd处理。 首先,sshd甚至不听这些端口,为什么sshd处理这些请求? 其次,我已启用(见屏幕截图)。 我试图连接随机端口,但我得到一个超时,因为它应该是(端口被阻止)。 我不认为自己是专家,但是…我以为我被覆盖了。 到底是怎么回事? 发行版和版本:Ubuntu 14.04.5 LTS UFW状态: auth.log:

Apache2 – 停止IPredirect到域

设置了SSL并使用在互联网上发现的一些修改configuration后,我无法访问我的网站使用IP地址它总是redirect到我的https://example.com 。 这是我的configuration: default-ssl.conf <IfModule mod_ssl.c> <VirtualHost *:80> Redirect "http://100.100.100.100/" "https://100.100.100.100/" Redirect "http://example.com" "https://example.com/" </VirtualHost> <VirtualHost _default_:443> ServerAdmin [email protected] ServerName example.com ServerAlias www.example.com DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLEngine on ##SSL Configs here <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 BrowserMatch […]

如何在CentOS 7上安装OpenSSH 7或更高版本

在CentOS 7上,我只能安装OpensSH服务器6.6.1,似乎无法安装任何最新的服务器。 如何安装OpenSSH 7或更高版本?

将主机(例如github)安全地添加到SSH known_hosts文件中?

如何安全地将主机密钥添加到SSH known_hosts文件中? 我正在设置一个开发机器,并且我想(例如)当我使用SSH从github.com克隆一个仓库时,阻止git提示。 我知道我可以使用StrictHostKeyChecking=no (例如这个答案 ),但这不是安全的。 到目前为止,我发现… Github发布他们的SSH密钥指纹https://help.github.com/articles/github-s-ssh-key-fingerprints/ 我可以使用ssh-keyscan来获取github.com的主机密钥。 我如何结合这些事实? 给定一个预先填充的指纹列表,如何validationssh-keyscan的输出可以添加到known_hosts文件中? 我想我在问: 如何获得由ssh-keyscan返回的密钥的指纹? 假设我已经为了SSH而进行了MITM编辑,但是我可以信任github HTTPS页面(因为它有一个有效的证书链)。 这意味着我有一些(可疑的)SSH主机密钥(来自ssh-keyscan )和一些(可信的)密钥指纹。 我如何validation一个对另一个? 相关:如何散列ssh-keyscan输出的主机部分? 或者我可以在已知主机中混合散列/非散列主机?

通过跳转主机的pssh和ssh-agent密钥转发

我试图连接到一些主机使用pssh结合跳转主机和ssh-agent密钥转发。 不幸的是,这经常会失败,但不同的主机不能正常工作。 所以这只是下一次看起来不一样的一个例子: ~> pssh -h /tmp/hostfile -o /tmp/log -e /tmp/error/ -v uname -a [1] 13:51:18 [FAILURE] host1 Exited with error code 255 [2] 13:51:19 [SUCCESS] host2 [3] 13:51:19 [SUCCESS] host3 [4] 13:51:19 [SUCCESS] host4 [5] 13:51:19 [SUCCESS] host5 [6] 13:51:19 [SUCCESS] host6 [7] 13:51:19 [SUCCESS] host7 …. [16] 13:51:19 [SUCCESS] host16 当看得更深时,我越来越了 ssh_exchange_identification: Connection […]

windows – gcloud ssh抛出潜在的安全漏洞错误

请注意 – 这是平台特定的。 我试过这个 >>> print sys.platform 'darwin' 而代码没有问题。 然而, >>> print sys.platform 'win32' 我得到这个问题。 此外,我能winscp进入实例没有问题。 我正在运行下面的gcloud ssh命令: gcloud compute ssh my-instance –zone=us-east1-b –command="sudo -S -i -u root -p '' echo 'git -C /root/git/v_a stash;git -C /root/git/v_a pull https://user:[email protected]/user/v_a.git;git -C /root/git/gcloud stash;git -C /root/git/gcloud pull https://user:[email protected]/user/gcloud.git;git -C /root/git/bt stash;git -C /root/git/bt pull https://user:[email protected]/user/bt.git;python /root/git/v_a/d_s_e.py –r-day=1 […]

SSH寻找id_rsa-cert获取key_load_public错误

1)我的~/.ssh文件夹有权限: drwx——. 2 user user 4.0K Aug 19 15:39 .ssh drwx——. 2 user user 4.0K Aug 19 15:39 .ssh 2)我运行ssh-keygen -t rsa并获取默认文件id_rsa和id_rsa.pub。 3)我复制/粘贴我的id_rsa.pub键到GitHub SSH密钥 4)当试图连接通过ssh -i id_rsa -vT [email protected]我得到以下内容: OpenSSH_7.5p1, OpenSSL 1.1.0f-fips 25 May 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Reading configuration data /etc/ssh/ssh_config.d/05-redhat.conf debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config debug1: /etc/ssh/ssh_config.d/05-redhat.conf line 8: Applying […]

SSH隧道与autossh打破

我有+10服务器与主服务器的隧道。 不幸的是,有时这些服务器中有一些正在失去连接,不会恢复。 我理解的方式是监视端口不需要在networking中是唯一的。 我错了吗? 如果这不是问题,我应该怎么去debugging呢? 日志只有状态连接丢失。