Tag: openssh

搞砸了我的ssh_config文件。 我该如何恢复原始文件?

我在Ubuntu上设置了ssh。 我不小心在ssh_config文件中复制了sshd_config的内容! 有没有一个地方可以找到原来的? 幸运的是我没有碰到ssh_config 。 我刚刚设置了sshd_config !

如何使用SSH / RSA密钥登录VPS

我按照这里的说明创建了一组ssh密钥(rsa),同时以root身份登录到vps。 建议的加密级别4096 … 钥匙已经在主机上,所以不需要转移…… 但指示分崩离析: “你可以通过这样做来确保这一点:” ssh @ 就是这样,我不明白接下来我需要做什么。 即root @ vpsIPaddress。 1 – 我在哪里这样做? 2 – 我可以使用相同的方式登录其他用户吗? 我无法理解这一点,因为对于我如何使用密钥而不是密码实际登录,我的指示似乎很不清楚。 下面的行在sshd_config中(但不确定ssh_config用于什么?) RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile %h/.ssh/authorized_keys AuthorizedKeysFile /etc/ssh/rootuser/authorized_keys 在home / ubuntu / .ssh目录中也有一个authorized_keys文件。 希望这是足够的信息。

如何限制用户访问权限

我有一台家用电脑,我创建了一个反向端口转发到服务器。 现在我想通过这台服务器访问一些人到家用电脑。 我想控制用户在此服务器上的访问权限,因此我将以下行添加到/ etc / ssh / sshd_config Match User restricteduser ChrootDirectory /home/restricteduser AllowAgentForwarding no PermitOpen localhost:3333 但是当我试图连接到服务器时 ssh restricteduser@serverIP restricteduser@serverIP’s password: 我收到以下错误: Write failed: Connection reset by peer

每次我尝试使用SSH连接到我的盒子时,它都无法连接

从任何其他使用SSH到我的Ubuntu 11.10的PC都失败了。 我的网络设置: Telenet ISP(比利时)>光缆< > RJ45电缆直接>到Ubuntu PC 甚至SSH正在运行: 其他PC:反复重试 $ ping 192.168.0.128 PING 192.168.0.128 (192.168.0.128) 56(84) bytes of data. From 192.168.0.226 icmp_seq=1 Destination Host Unreachable From 192.168.0.226 icmp_seq=2 Destination Host Unreachable From 192.168.0.226 icmp_seq=3 Destination Host Unreachable From 192.168.0.226 icmp_seq=4 Destination Host Unreachable $ sudo service iptables stop Stopping iptables (via systemctl): [ OK […]

ssh拒绝连接消息“no hostkey alg”

我的SSH连接运行良好,但是从上周开始,我的笔记本电脑上的SSH连接到我的电路板拒绝连接。 我可以从电路板到笔记本电脑建立SSH连接,但反之亦然。 我尝试使用我的用户和root用户并遇到同样的问题。 我的笔记本电脑是Ubuntu 12.10,我的电路板是Debian 6。 这是SSH的详细输出: danialbehzadi @ danial-HP:〜$ ssh -v 192.168.1.2 OpenSSH_5.2p1,OpenSSL 1.0.1c 2012年5月10日 debug1:读取配置数据/ usr / local / etc / ssh_config debug1:连接到192.168.1.2 [192.168.1.2]端口22。 debug1:已建立连接。 debug1:身份文件/home/danialbehzadi/.ssh/identity type -1 debug1:身份文件/home/danialbehzadi/.ssh/id_rsa类型1 debug1:identity file /home/danialbehzadi/.ssh/id_dsa type -1 debug1:远程协议版本2.0,远程软件版本OpenSSH_6.0p1 Debian-4 debug1:match:OpenSSH_6.0p1 Debian-4 pat OpenSSH * debug1:为协议2.0启用兼容模式 debug1:本地版本字符串SSH-2.0-OpenSSH_5.2 debug1:发送SSH2_MSG_KEXINIT debug1:收到SSH2_MSG_KEXINIT debug1:kex:server-> client aes128-ctr hmac-md5 none debug1:kex:client-> server aes128-ctr […]

无法安装Openssh-server或客户端

当我去安装时,我收到此错误: sudo apt-get install openssh-server Reading package lists… Done Building dependency tree Reading state information… Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. […]

通过systemd在启动时启用和禁用sshd

我安装了openssh-server但是我有时希望在启动时默认关闭sshd服务,并且只在需要时从终端启动它。 基于许多其他问题的建议,在我的systemd使用16.04发行版启用和禁用启动服务应该很简单: $sudo systemctl disable sshd.service 这似乎有效。 但是,在此之后我无法再在启动时启用该服务: $sudo systemctl enable sshd.service Failed to execute operation: No such file or directory 即使卸载并重新安装openssh-server也无法解决问题,但是purge也是如此。 我通过systemd禁用sshd ,如何在启动时重新启用sshd ? 请注意,即使在这种混乱的状态下,我仍然可以通过service ssh [start | stop]`手动启动和停止服务。

卸载ssh

ssh安装在我的系统中。 ssh -V OpenSSH_6.6.1p1 Ubuntu-2ubuntu2, OpenSSL 1.0.1f 6 Jan 2014 但是当我尝试使用sudo apt-get purge openssh-server完全卸载它时,它说Package ‘openssh-server’ is not installed, so not removed 。 我怎么能完全删除它? 我正在使用Ubuntu终端发出SSH登录 – 权限被拒绝(publickey) ,所以我想卸载它并再次重新安装它。 正如Mark在回答/评论中所建议的,我已经使用synaptic包管理器卸载了ssh,ssh -V仍然显示它在那里。 可能是什么问题? 正如所建议的那样,我再次重新安装它,仍然使用Ubuntu终端进行SSH登录 – 权限被拒绝(公钥)问题。 在synaptic包管理器中搜索ssh时,安装ssh时,它会显示类似附加图像的内容,而不是显示ssh元包。

为什么我通过SSH连接到服务器时出现“连接被拒绝”错误?

我用LAMP堆栈安装了Ubuntu 12.04.1 LTS。 我可以ping它,但当我尝试连接到它时,无法找到服务器。 当我尝试连接WinSCP时,我收到错误Network error: connection refused 。 我已经安装了openssh-server和openssh-client软件包但仍然无法连接。

无法SSH进入Ubuntu Touch设备

从我的电脑: cameron@cameron-ubuntu:~$ ssh phablet@192.168.99.124 Permission denied (publickey). 所以看来手机上的openssh没有启用密码validation。 但在我看来它应该是这样的。 来自手机的/ etc / ssh / 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 […]