我正在尝试通过笔记本电脑上的腻子连接到在我的家用计算机上的 cygwin 上运行的 ssh 服务器,这在我的网络内部和外部端口 22 上都可以正常工作,但在端口 443 上却超时。这有点问题,因为我要连接的网络阻止我使用 22。我认为这是一个端口转发问题,但我已经在我的路由器设置中设置了规则(ISP 提供了 BT HomeHub 3 类型A)但它似乎没有打开端口。非常感谢有关如何解决问题的任何想法。
我正在设置一个需要通过 SSH2 建立安全连接的服务器应用程序,例如客户端必须打开到服务器的 SSH2 连接才能访问特定应用程序:
% ssh -s -p5000 my.server.com app
Run Code Online (Sandbox Code Playgroud)
我想了解,此命令完成后究竟发生了什么?客户端/服务器如何知道它们必须通过 SSH 安全通道运行?这是否称为 ssh 隧道,或者它有不同的名称?
谢谢。
我想正确设置我的 SSH 连接。正如很多教程告诉我的那样,不建议使用 Ubuntu 服务器的 root 帐户。所以我宁愿使用我的标准帐户“西蒙”来上传文件和传输终端命令。
当我运行“sudo su”时,系统会提示我为我的用户帐户 Simon 输入标准密码以获得 root 权限。我很确定,我应该被要求输入 root 密码,不是吗?我怎样才能解决这个问题?
我真的不需要 ssh 密钥。服务器具有良好的安全性。
我需要脚本在没有用户使用/交互的情况下输入密码。我怎样才能做到这一点?它的 CentOS 版本 6.5(最终版)
#!/bin/bash
#Credentials
PASS="p77Z"
sudo rsync -rlptDvz --owner=cmsseren --group=cmsseren /home/serena/public_html/ -e ssh root@ip:/home/cmsseren/public_html3/
ssh root@ip 'chown -R cmsseren:cmsseren /home/cmsseren/public_html3/*'
Run Code Online (Sandbox Code Playgroud) 我无法使用 ssh 连接到我的服务器。我已经使用 ssh 开始了一个会话,但我知道如果我退出这个会话,我将无法再次连接到我的服务器。
ssh root@genese.com
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
07:fe:8f:12:83:09:ce:87:ec:60:9d:75:b4:d2:04:12.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA …Run Code Online (Sandbox Code Playgroud) 我是同一防火墙下的两台服务器 A 和 B。我可以使用 root 帐户从服务器 A 登录到 B,但无法从 B 登录到 A。我的 ssh 密钥已正确配置,但我无法弄清楚我们出了什么问题。
这是我尝试从服务器 B 连接到 A 时的详细信息。
root@web04:~# ssh -v -i.ssh/id_rsa root@11.11.11.4
OpenSSH_5.9p1 Debian-5ubuntu1.4, OpenSSL 1.0.1 14 Mar 2012
Warning: Identity file .ssh/id_rsa not accessible: No such file or directory.
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 11.11.11.4 [11.11.11.4] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1 …Run Code Online (Sandbox Code Playgroud) 我有一台使用 CentOS 的 Linux 服务器。我已经更改了 SSH 配置以使其更安全,首先我将其从默认的 21(或 22?)更改为 34786。这样,如果有人试图入侵,至少他们必须猜测端口?
但我的问题是,我听说有一些工具可以找出我的 SSH 配置设置到哪个端口?使这种安全措施无用?这是真的还是假的。
问候
我正在按照此处的步骤进行无密码 SSH
为了从userA@hostA 登录到userB@hostB,~/.ssh/authorized_keysat hostB 需要包含userA@hostA 的公钥。
当我第一次在 userB@hostB 登录时创建 .ssh/ 时,它的权限是771 或 drwxrwxr-x。在此权限状态下,我无法在没有密码的情况下从 userA@hostA ssh 到 userB@hostB。
但是当我chmod 700 .ssh在 userB@hostB 上时,我可以愉快地不使用密码进行 SSH。
有人可以向我解释为什么通过提供较不严格的权限无法实现无密码 SSH?
我知道我可以将用于连接到服务器上的 SSH 的客户端 IP 列入白名单,然后拒绝所有其他 IP。然而,看到到达服务器网络接口的数据包如何必须包含 IP,是什么阻止某人假装是列入白名单的 IP?
我在 /etc/ssh/sshd_config 中添加了行“端口 110”,就在现有行“端口 22”的/etc/init.d/sshd restart下方,然后期待看到 sshd 侦听两个端口(22 和 110)。但是 netstat -anp 显示 sshd 只侦听默认端口 (22)。
后来我尝试bash -x /etc/init.d/sshd restart并惊讶地看到 sshd 立即绑定到端口 110 !/etc/init.d/sshd restart再次发出一秒钟无视我的变化。重新启动也会忽略我的更改,所以我被卡住了,完全不解。
更新这个奇怪的行为只出现在低端口(<1024)
这是在 CentOS 6 服务器上。
细节
这是我对 /etc/ssh/sshd_config 的修改:
grep ^Port /etc/ssh/sshd_config
Port 22
Port 110
Run Code Online (Sandbox Code Playgroud)
netstat 后的输出 bash -x /etc/init.d/sshd restart
netstat -anp | grep -i listen|grep sshd|grep -v :::
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 7031/sshd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 7031/sshd …Run Code Online (Sandbox Code Playgroud) ssh ×10
centos ×3
ssh-tunnel ×3
linux ×2
networking ×2
cygwin ×1
cygwin-sshd ×1
password ×1
permissions ×1
port ×1
putty ×1
root ×1
rsa ×1
rsync ×1
security ×1
ssh-keys ×1
sudo ×1
tunneling ×1
ubuntu ×1