I'm trying to ssh from my mac laptop to my linux desktop.
I ran ifconfig
on my linux desktop (the target machine) and got the ip address listed under eth0 (the machine is connected via wire - not wirelessly) next to "inet addr:"
I used this ip address in a ping command from my mac, which works as expected.
But when I then try to ssh to the machine using the same address I'm unable to reach the machine:
$ ssh -A 172.28.11.243
ssh: connect to host 172.28.11.243 port 22: Connection refused
i've googled a bit about what to check next but i'm unclear about what to do. Any pointers would be appreciated.
update 1:
$service ssh status
ssh stop/waiting
Update 2:
$ps -eaf | grep sshd
rabdelaz 23832 8389 0 10:53 pts/1 00:00:00 grep sshd
Starting Over:
$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
Output of the logs:
$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 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
Answer
OK, for some reason your ssh
service does not want to start. There should be some information in the logs, try
sudo grep -i ssh /var/log/*log
Then post the output and we an have a look.
I would guess, however, that simply reinstalling your ssh
server should fix it. If you are OK with losing any changes you have made to your ssh
configuration, try this:
sudo apt-get purge openssh-server ssh
sudo apt-get install openssh-server ssh
sudo service ssh start
Then try logging in from your other machine again.
No comments:
Post a Comment