Я пытаюсь ssh с моего ноутбука Mac на мой рабочий стол Linux.
Я запустил ifconfig
на своем рабочем столе linux (целевой машине) и получил IP-адрес, указанный в разделе eth0 (машина подключена по проводам, а не по беспроводной сети) рядом с «inet addr:»
Я использовал этот IP-адрес в команде ping с моего Mac, которая работает как положено.
Но когда я пытаюсь подключиться к компьютеру по тому же адресу, я не могу связаться с ним:
$ ssh -A 172.28.11.243
ssh: connect to host 172.28.11.243 port 22: Connection refused
Я немного погуглил о том, что проверить дальше, но мне неясно, что делать. Любые указатели будут оценены.
обновление 1:
$service ssh status
ssh stop/waiting
Обновление 2:
$ps -eaf | grep sshd
rabdelaz 23832 8389 0 10:53 pts/1 00:00:00 grep sshd
Начать сначала:
$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
Вывод логов:
$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