Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've just (re)installed ubuntu 11.10 on my main pc, and the connection times out every time I try to ssh connect to my laptop (over the local network) to retrieve the files I backed up there. The connection times out every time I try to connect.

I can establish a connection in the other direction without issue.

Here's the verbose output I get when I try to connect:

ovangle@ruby-EP43-DS3:~$ ssh -v [email protected]
OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.1.1.4 [10.1.1.4] port 22.
debug1: connect to address 10.1.1.4 port 22: Connection timed out
ssh: connect to host 10.1.1.4 port 22: Connection timed out

ssh is installed on both machines, and I've tried deleting '~/.ssh/known_hosts' on both machines, still nada.

I've changed the sshd logging on the laptop to VERBOSE and restarted the daemon (because I wasn't getting any relevant syslog entries otherwise), and this is the log for the most recent connection attempt.

EDIT: posted wrong logs last time. They just showed that there was a connection received, they weren't actually the sshd logs (which were in auth.log as I recently discovered). Unfortunately, that log is filling up with extremely weird error messages and it gives me no information about the connection.

Nov  8 16:02:18 ovangle-A6Rp pkexec: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Nov  8 16:02:18 ovangle-A6Rp pkexec: pam_ck_connector(polkit-1:session): cannot determine display-device
Nov  8 16:02:18 ovangle-A6Rp pkexec[6270]: ovangle: Executing command [USER=root] [TTY=unknown] [CWD=/home/ovangle] [COMMAND=/usr/sbin/gnome-power-backlight-helper --set-brightness 2]
Nov  8 16:02:19 ovangle-A6Rp pkexec: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Nov  8 16:02:19 ovangle-A6Rp pkexec: pam_ck_connector(polkit-1:session): cannot determine display-device
Nov  8 16:02:19 ovangle-A6Rp pkexec[6273]: ovangle: Executing command [USER=root] [TTY=unknown] [CWD=/home/ovangle] [COMMAND=/usr/sbin/gnome-power-backlight-helper --set-brightness 7]
share|improve this question
2  
Try to use verbose, eg. "ssh -vvv username@laptop" and post the relevant output. –  nsg Nov 7 '11 at 11:25
    
Do you have openssh-server installed on both machines? –  Elvis Stressborg Nov 7 '11 at 11:45
    
updated the post with the relevant output. Also, both machines have openssh-server installed. –  ovangle Nov 7 '11 at 12:56
    
What does sshd log on the laptop when connecting to there? –  kbyrd Nov 7 '11 at 13:02
    
on the machine you're trying to connect to do a sudo service ssh restart and see what the output is. –  Smithamax Jan 12 '12 at 11:03

1 Answer 1

Ensure you have the ssh server running by running the below on the machine you wish to connect to:

service ssh status

If that returns start/running, process pid then it is running ok. If not run

service ssh start

and check the output that it starts correctly. If it is started correctly and you still can not ssh to the machine then on the remote host install nmap

apt-get install nmap

Nmap (Network Mapper) is a port scanner which is useful for this kind of stuff. Run the below on the computer you are connecting from

nmap *ipaddress/hostname of computer you are trying to connect to*

and check the 22/tcp or ssh is shown as open.

refer to Ubuntu iptables to learn how to open the ports.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.