Não é possível usar o ssh no meu desktop

1

Estou tentando fazer o ssh do meu laptop mac para meu desktop linux.

Eu executei ifconfig na minha área de trabalho linux (a máquina de destino) e obtive o endereço IP listado em eth0 (a máquina está conectada via fio - não sem fio) ao lado de "inet addr:"

Eu usei este endereço IP em um comando ping do meu mac, que funciona como esperado.

Mas quando eu tento ssh para a máquina usando o mesmo endereço, não consigo acessar a máquina:

$ ssh -A 172.28.11.243
ssh: connect to host 172.28.11.243 port 22: Connection refused

Eu pesquisei um pouco sobre o que verificar em seguida, mas não estou certo sobre o que fazer. Quaisquer ponteiros seriam apreciados.

atualização 1:

$service ssh status
ssh stop/waiting

Atualização 2:

$ps -eaf | grep sshd
rabdelaz 23832  8389  0 10:53 pts/1    00:00:00 grep sshd

Recomeçando:

$ifconfig                                                             
eth0      Link encap:Ethernet  HWaddr 68:05:ca:16:c6:da  
          inet addr:172.28.11.243  Bcast:172.28.11.255  Mask:255.255.254.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26758 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12721 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5683822 (5.6 MB)  TX bytes:2044745 (2.0 MB)
          Memory:f71c0000-f71e0000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:22 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1476 (1.4 KB)  TX bytes:1476 (1.4 KB)

$service ssh status
ssh stop/waiting
$sudo service ssh start
ssh stop/pre-start, process 2961
$service ssh status
ssh stop/waiting
$grep Port /etc/ssh/ssh_config
#   Port 22

Saída dos registros:

$sudo grep -i ssh /var/log/*log
[sudo] password for rabdelaz: 
/var/log/auth.log:Sep  9 11:17:21 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz/workspace/configurations ; USER=root ; COMMAND=/usr/bin/ssh-add  /home/rabdelaz/.ssh/deployed/2013-07-29
/var/log/auth.log:Sep  9 11:18:12 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz/workspace/configurations ; USER=root ; COMMAND=/usr/bin/ssh-add /home/rabdelaz/.ssh/deployed/2013-07-29
/var/log/auth.log:Sep  9 11:29:41 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz/workspace/configurations ; USER=root ; COMMAND=/usr/bin/ssh-add /home/rabdelaz/.ssh/deployed/2013-07-29
/var/log/auth.log:Sep  9 11:30:58 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz/workspace/configurations ; USER=root ; COMMAND=/bin/chmod 777 /home/rabdelaz/.ssh/deployed/2013-07-29
/var/log/auth.log:Sep  9 11:52:04 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz ; USER=root ; COMMAND=/bin/chmod 777 /home/rabdelaz/.ssh/deployed/2013-07-29
/var/log/auth.log:Sep  9 12:01:42 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz ; USER=root ; COMMAND=/bin/ls -lha /home/rabdelaz/.ssh/deployed/2013-07-29
/var/log/auth.log:Sep  9 12:04:18 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz ; USER=root ; COMMAND=/bin/chmod 777 /home/rabdelaz/.ssh/internal/2013-07-29
/var/log/auth.log:Sep  9 12:04:21 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz ; USER=root ; COMMAND=/bin/chmod 777 /home/rabdelaz/.ssh/external/2013-07-29
/var/log/auth.log:Sep  9 12:04:39 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz ; USER=root ; COMMAND=/bin/chmod 777 /home/rabdelaz/.ssh/internal/2013-07-29
/var/log/auth.log:Sep 11 11:54:01 bos-lpwy9 sudo: rabdelaz : TTY=pts/2 ; PWD=/home/rabdelaz/workspace ; USER=root ; COMMAND=/usr/sbin/sshd
/var/log/auth.log:Sep 11 11:54:12 bos-lpwy9 sudo: rabdelaz : TTY=pts/2 ; PWD=/home/rabdelaz/workspace ; USER=root ; COMMAND=/usr/sbin/sshd
/var/log/auth.log:Sep 11 11:54:20 bos-lpwy9 sudo: rabdelaz : TTY=pts/2 ; PWD=/home/rabdelaz/workspace ; USER=root ; COMMAND=/usr/sbin/sshd start
/var/log/auth.log:Sep 11 11:54:54 bos-lpwy9 sudo: rabdelaz : TTY=pts/2 ; PWD=/home/rabdelaz/workspace ; USER=root ; COMMAND=/usr/sbin/service ssh start
/var/log/auth.log:Sep 11 13:36:11 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz/workspace/automation ; USER=root ; COMMAND=/usr/bin/apt-get install  libdbi-perl libdate-calc-perl libdbd-mysql-perl libxml-easyobj-perl libdbd-pg-perl libnetaddr-ip-perl libjson-perl libconfig-json-perl libio-pty-perl libnet-ssh-perl libtext-diff-perl libwww-mechanize-perl libtext-csv-perl p4perl libxml-simple-perl liblog-log4perl-perl libyaml-libyaml-perl libdevel-stacktrace-perl libexception-class-perl libdatetime-perl libtest-deep-perl libperl-critic-perl
/var/log/auth.log:Sep 11 14:02:12 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz/workspace/automation ; USER=root ; COMMAND=/usr/bin/cpan httpssh
/var/log/auth.log:Sep 12 10:56:31 bos-lpwy9 sudo: rabdelaz : TTY=pts/1 ; PWD=/home/rabdelaz/workspace/automation ; USER=root ; COMMAND=/usr/sbin/service ssh start
/var/log/auth.log:Sep 12 11:13:19 bos-lpwy9 sudo: rabdelaz : TTY=pts/1 ; PWD=/home/rabdelaz/workspace/automation ; USER=root ; COMMAND=/usr/sbin/service ssh start
/var/log/auth.log:Sep 12 11:13:23 bos-lpwy9 sudo: rabdelaz : TTY=pts/1 ; PWD=/home/rabdelaz/workspace/automation ; USER=root ; COMMAND=/usr/sbin/service ssh start
/var/log/auth.log:Sep 12 11:15:46 bos-lpwy9 sudo: rabdelaz : TTY=pts/1 ; PWD=/home/rabdelaz/workspace/automation ; USER=root ; COMMAND=/usr/sbin/service sshd start
/var/log/auth.log:Sep 12 11:26:40 bos-lpwy9 sudo: rabdelaz : TTY=pts/1 ; PWD=/home/rabdelaz/workspace/automation ; USER=root ; COMMAND=/usr/sbin/service ssh start
/var/log/auth.log:Sep 12 11:55:29 bos-lpwy9 sudo: rabdelaz : TTY=pts/0 ; PWD=/home/rabdelaz/workspace ; USER=root ; COMMAND=/bin/grep -i ssh /var/log/auth.log /var/log/boot.log /var/log/centrifydc-install.log /var/log/centrify_mapper_error.log /var/log/daemon.log /var/log/dpkg.log /var/log/faillog /var/log/fontconfig.log /var/log/jockey.log /var/log/kern.log /var/log/lastlog /var/log/lpr.log /var/log/mail.log /var/log/pm-powersave.log /var/log/pycentral.log /var/log/syslog /var/log/ufw.log            /var/log/user.log /var/log/Xorg.0.log
/var/log/dpkg.log:2013-09-11 13:36:18 install libnet-ssh-perl <none> 0.09-1
/var/log/dpkg.log:2013-09-11 13:36:18 status half-installed libnet-ssh-perl 0.09-1
/var/log/dpkg.log:2013-09-11 13:36:18 status half-installed libnet-ssh-perl 0.09-1
/var/log/dpkg.log:2013-09-11 13:36:18 status unpacked libnet-ssh-perl 0.09-1
/var/log/dpkg.log:2013-09-11 13:36:18 status unpacked libnet-ssh-perl 0.09-1
/var/log/dpkg.log:2013-09-11 13:36:24 configure libnet-ssh-perl 0.09-1 0.09-1
/var/log/dpkg.log:2013-09-11 13:36:24 status unpacked libnet-ssh-perl 0.09-1
/var/log/dpkg.log:2013-09-11 13:36:24 status half-configured libnet-ssh-perl 0.09-1
/var/log/dpkg.log:2013-09-11 13:36:24 status installed libnet-ssh-perl 0.09-1
    
por Ramy 12.09.2013 / 16:44

1 resposta

1

OK, por algum motivo, o serviço ssh não deseja iniciar. Deve haver alguma informação nos logs, tente

sudo grep -i ssh /var/log/*log

Em seguida, publique a saída e daremos uma olhada.

Eu diria, no entanto, que simplesmente reinstalar o seu servidor ssh deve consertá-lo. Se você está bem em perder as alterações feitas na configuração ssh , tente o seguinte:

sudo apt-get purge openssh-server ssh
sudo apt-get install openssh-server ssh
sudo service ssh start

Em seguida, tente fazer login a partir de sua outra máquina novamente.

    
por 12.09.2013 / 17:48