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.

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.

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.

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.

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.