954,202 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Can't SSH into Ubuntu

I'm having trouble using SSH to gain access to my Ubuntu 9 machine (extreme linux neophyte). I have the Ubuntu server and OpenSSH installed, as well as Samba on one machine, and I'm trying to access this machine, via SSH, from my Mac--which is running OS X 10.5.6.

I am trying to SSH into the Ubuntu machine, so I can SFTP files from the Samba server onto my Mac, (not sure if that's the most efficient way, but I think it'll work).

However, when I try and SSH into the Ubuntu machine, the SSH command just times out. I don't think it's a port issue, because from what I understand, Ubuntu doesn't install a firewall by default.

I feel like I'm missing a simple step, but I can't seem to figure it out.

Any help or suggestions would be greatly appreciated.

b3ckm4n
Newbie Poster
3 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

What type of message is ssh returning? I just installed 9.04 on one of my machines yesterday and loaded openssh. I was able to login from my Mac right away. My setup is a little different though, I'm using 9.04 desktop not server - so there may be some differences.

BlackJavaBean
Light Poster
39 posts since Feb 2008
Reputation Points: 13
Solved Threads: 7
 

Thanks for your reply.

After typing:

ssh username@hostip

the terminal returns the error:ssh: connect to host 192.168.1.106 port 22: Operation timed out

Not sure if the different versions matter, but I would assume the main difference between the desktop/server editions would be the packages installed.

b3ckm4n
Newbie Poster
3 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

From the Ubuntu server, run:

$ netstat -a

And see if you see something like *.ssh under IPv4 (usually near the top of the output) .. This will tell you whether your SSH server is up or not.

Second, when you try SSH again, use the -vv flags:

$ ssh -vv username@hostip


EDIT: The '-vv' flags may give you an indication of what is going awry.

Stylish
Junior Poster
149 posts since May 2007
Reputation Points: 44
Solved Threads: 19
 

Thanks for your reply.

Here's what I got when I ran netstat--I just pulled all of the lines that had ssh in them:

unix 2 [ ACC ] STREAM LISTENING 9887 /tmp/ssh-sdPcyK3687/agent.3687

unix 2 [ ACC ] STREAM LISTENING 10465 /tmp/keyring-SUd9DN/socket.ssh

And here's what I got while running ssh -vv:OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.xxx.xxx [192.168.xxx.xxx] port 22.
debug1: connect to address 192.168.xxx.xxx port 22: Operation timed out
ssh: connect to host 192.168.xxx.xxx port 22: Operation timed out

I tried restarting ssh through init.d, but when running netstat, it didn't add anything.

Any idea?

b3ckm4n
Newbie Poster
3 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You