? ? ? ? 在之前安裝系統(tǒng)的時候有一個安裝 SSH 服務(wù)的,結(jié)果沒點上,導(dǎo)致系統(tǒng)完成后,ssh無法連接上啊,于是要安裝sshd 服務(wù)。使用命令:apt-get install openssh-server 結(jié)果就出現(xiàn)問題了:
網(wǎng)上搜索說是要更新源,于是把網(wǎng)上列的一些源都更新了,結(jié)果還是不行。加了網(wǎng)易的源地址還是不行,最后是加了阿里云的源才可以的:
?看到這些似乎就有希望了,我的 /etc/apt/sources.list 是這樣的:
root@debian-ytian:/etc/ssh# cat /etc/apt/sources.list
#deb cdrom:[Debian GNU/Linux 12.0.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20230610-10:23]/ bookworm main non-free-firmware
deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb http://mirrors.163.com/debian/ wheezy main non-free contrib
deb http://mirrors.163.com/debian/ wheezy main non-free contrib
deb https://mirror.bjtu.edu.cn/debian/ wheezy main non-free contrib
deb http://mirrors.163.com/debian/ wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ wheezy main non-free contrib
deb-src http://mirrors.163.com/debian/ wheezy-proposed-updates main non-free contrib
似乎只有阿里云的有用:deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
文件保存后,需要執(zhí)行:apt-get update; apt-get upgrade
然后再安裝openssh-server: apt-get install openssh-server,結(jié)果還是沒有安裝成功:
好像又依賴兩個安裝包,結(jié)果又網(wǎng)上一翻搜索,使用:apt-get install openssh-client=1:8.4p1-5+deb11ul 結(jié)果安裝沒有出錯,似乎連剛才提示的 openssh-sftp-server 也一并安裝了:
安裝完成后,重啟,查看一下sshd服務(wù)的狀態(tài),似乎已經(jīng)跑起來了:
服務(wù)起來后就可以ssh連接了,但由于我的SecureCRT 版本過低,連接時出現(xiàn)了如下 的錯誤:
?
需要安裝8以上的版本才行,網(wǎng)上搜索了半天沒有找到免費的,只能在萬能的taobao上花10塊錢買了一個 9.3.2 版本的:
?文章來源:http://www.zghlxwxcb.cn/news/detail-496672.html
?終于連接上了,完美。文章來源地址http://www.zghlxwxcb.cn/news/detail-496672.html
到了這里,關(guān)于Debian openssh-server 的安裝的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!