Cannot install sshd (openssh-server) on debian 10.4
Solution 1:
It seems that during the install, you answered "No" to the question "Use a network mirror?", and so your system left configured without a mirror (or maybe you didn't have a network connection during install). This, by the way, is indicated by your sources.list:
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
So now you have an incomplete sources.list
, which contains updates and security fixes, but doesn't contain the base system. I don't know how the DVD line got commented out from your sources.list
, since the installer does not remove it if there are no network mirrors.
You have to configure a mirror in order to be able to properly install packages. Add this line to your sources.list
:
deb http://ftp.us.debian.org/debian/ buster main contrib non-free
and run apt update
. After that, you can install openssh-server
.
You might want to switch the mirror to something closer to you, this can be done by changing the us
part of the URL to correspond to your country, or supplying a different mirror. The list of mirror sites is available here.
Alternatively, you can install the netselect-apt
package, which will search for the fastest mirror near you.
As a side note: Debian does supply a secure remote shell, all you have to do is tick "SSH Server" on the "Software selection" page during install (why it is not selected by default is beyond me, but still).