我不小心删除了/etc/ssh/ssh_config文件。
我试过清除并重新安装openssh-server,ssh但文件没有返回。
我将如何恢复这个文件?
这是我的/etc/network/interfaces文件
我正在尝试添加 2 个连接到 2 个不同 ISP 的 2 个不同路由器的虚拟接口
auto lo
iface lo inet loopback
iface eth2 inet static
address 192.168.0.57
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.8.8 8.8.4.4
iface eth3 inet static
address 192.168.1.57
netmask 255.255.255.0
gateway 192.168.1.1
Run Code Online (Sandbox Code Playgroud)
我已经尝试了所有这些命令,但没有一个起作用
sudo /etc/init.d/networking restart
sudo /etc/init.d/networking reload`
Run Code Online (Sandbox Code Playgroud)
还有这些
sudo ifconfig eth2 down
sudo ifconfig eth2 up
Run Code Online (Sandbox Code Playgroud)
我收到一个错误:
eth2:获取接口标志时出错:没有这样的设备
我试着插入manged=false在/etc/NetworkManager/NetworkManager.conf
然后重新启动 sudo service network-manger restart
当我打字 ifconfig -a
我得到的只是
eth0 Link encap:Ethernet HWaddr fc:aa:14:4d:11:22
inet addr:192.168.1.90 …Run Code Online (Sandbox Code Playgroud) 我知道PermitRootLogin yes使用 ssh 通过 root 登录时需要设置没有密码提示
我已经在下面设置了,但是当我给ssh root@localhost 我时我仍然收到密码提示,需要进一步更改什么?
我已经重新启动它也使用 sudo service ssh restart
完整的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
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned …Run Code Online (Sandbox Code Playgroud)