Prezados, utilizo o Ubuntu 20.04.1, instalado exclusivamente para realizar alguns dos cursos.
Na instalação do ssh tive os seguintes logs:
acrajag@acrajag-ZenBook-UX481FL-UX481FL:~/Downloads$ sudo apt-get install ssh
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
ncurses-term openssh-server openssh-sftp-server ssh-import-id
Suggested packages:
molly-guard monkeysphere ssh-askpass
The following NEW packages will be installed:
ncurses-term openssh-server openssh-sftp-server ssh ssh-import-id
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 693 kB of archives.
After this operation, 6130 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://pt.archive.ubuntu.com/ubuntu focal-updates/main amd64 openssh-sftp-server amd64 1:8.2p1-4ubuntu0.1 [51,5 kB]
Get:2 http://pt.archive.ubuntu.com/ubuntu focal-updates/main amd64 openssh-server amd64 1:8.2p1-4ubuntu0.1 [377 kB]
Get:3 http://pt.archive.ubuntu.com/ubuntu focal-updates/main amd64 ssh all 1:8.2p1-4ubuntu0.1 [5080 B]
Get:4 http://pt.archive.ubuntu.com/ubuntu focal/main amd64 ncurses-term all 6.2-0ubuntu2 [249 kB]
Get:5 http://pt.archive.ubuntu.com/ubuntu focal/main amd64 ssh-import-id all 5.10-0ubuntu1 [10,0 kB]
Fetched 693 kB in 0s (1905 kB/s)
Preconfiguring packages ...
Selecting previously unselected package openssh-sftp-server.
(Reading database ... 258140 files and directories currently installed.)
Preparing to unpack .../openssh-sftp-server_1%3a8.2p1-4ubuntu0.1_amd64.deb ...
Unpacking openssh-sftp-server (1:8.2p1-4ubuntu0.1) ...
Selecting previously unselected package openssh-server.
Preparing to unpack .../openssh-server_1%3a8.2p1-4ubuntu0.1_amd64.deb ...
Unpacking openssh-server (1:8.2p1-4ubuntu0.1) ...
Selecting previously unselected package ssh.
Preparing to unpack .../ssh_1%3a8.2p1-4ubuntu0.1_all.deb ...
Unpacking ssh (1:8.2p1-4ubuntu0.1) ...
Selecting previously unselected package ncurses-term.
Preparing to unpack .../ncurses-term_6.2-0ubuntu2_all.deb ...
Unpacking ncurses-term (6.2-0ubuntu2) ...
Selecting previously unselected package ssh-import-id.
Preparing to unpack .../ssh-import-id_5.10-0ubuntu1_all.deb ...
Unpacking ssh-import-id (5.10-0ubuntu1) ...
Setting up openssh-sftp-server (1:8.2p1-4ubuntu0.1) ...
Setting up openssh-server (1:8.2p1-4ubuntu0.1) ...
Creating config file /etc/ssh/sshd_config with new version
Creating SSH2 RSA key; this may take some time ...
3072 SHA256:PXgigx4wYfkz7MFAlZF4LiuMcsiI7dC6/jFoMbe730I root@acrajag-ZenBook-UX481FL-UX481FL (RSA)
Creating SSH2 ECDSA key; this may take some time ...
256 SHA256:ioQ2skuw9aluI3rjDCBLSVMtnwnmuCsyctRvSxM7sF0 root@acrajag-ZenBook-UX481FL-UX481FL (ECDSA)
Creating SSH2 ED25519 key; this may take some time ...
256 SHA256:IEzTm3VcWfa5DLxaj4zSXHO4FNFQqEgE+YLJD51jDbk root@acrajag-ZenBook-UX481FL-UX481FL (ED25519)
Created symlink /etc/systemd/system/sshd.service → /lib/systemd/system/ssh.service.
Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service → /lib/systemd/system/ssh.service.
/usr/sbin/policy-rc.d returned 101, not running 'start rescue-ssh.target'
invoke-rc.d: policy-rc.d denied execution of start.
Setting up ssh-import-id (5.10-0ubuntu1) ...
Attempting to convert /etc/ssh/ssh_import_id
Setting up ncurses-term (6.2-0ubuntu2) ...
Setting up ssh (1:8.2p1-4ubuntu0.1) ...
Processing triggers for systemd (245.4-4ubuntu3.4) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for ufw (0.36-6) ...
Peço atenção ao final, onde se vê:
/usr/sbin/policy-rc.d returned 101, not running 'start rescue-ssh.target'
invoke-rc.d: policy-rc.d denied execution of start.
Ao tentar conectar ao outro usuário, retorna o seguinte?
acrajag@acrajag-ZenBook-UX481FL-UX481FL:~$ ssh test@localhost
ssh: connect to host localhost port 22: Connection refused
O mesmo ocorre na tentaviva de copiar os arquivos:
acrajag@acrajag-ZenBook-UX481FL-UX481FL:~/Desktop/workspace$ scp bemvindo2.txt jose@localhost:~/
ssh: connect to host localhost port 22: Connection refused
lost connection
Preciso de ajuda, porque a utilização do Ubuntu está deprimente! Instalei para estudar DevOps, especificamente para o Ansible e Docker, mas seguindo toda a formação. Por ter problemas nas instalações resolvi vir para o curso de Linux antes, mas tenho os mesmos problemas aqui a partir da aula 9 deste segundo módulo (APT). Como podem ver, há pedido de ajuda em cada um dos tópicos a partir da aula 9.
Peço ajuda para compreender o que pode estar causando este problema e poder concluir o curso.
Obrigado.