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 have configured an ssh server on a Ubuntu 12.04 LTS machine. I changed the listening port to the one different from the default port 22 (that's the only change I made on the server).

I am trying to connect to the server from a Ubuntu remote machine but the connection is refused. The weird thing is that I can connect to the server from a Windows remote machine.

What makes this difference? How can I make the Ubuntu remote machine get connected to the server?

[Server]

  • OS: Ubuntu 12.04.03 64bit Desktop
  • Checked the ssh process is running
  • Firewall: not changed from default status
  • Checked the ssh port is open to public

[Ubuntu Remote Machine]

  • OS: Ubuntu 13.04 or 13.10 64bit Desktop
  • Client Software: Vinagre
  • Firewall: not changed from default status

[Windows Remote Machine]

  • OS: Windows 7 Ultimate 64bit
  • Client Software: Tera Term
  • Firewall: not changed from default status
share|improve this question
    
Try ssh user@hostname_or_IPaddress:alternate_port_number –  douggro Dec 30 '13 at 1:19
add comment

2 Answers 2

When Connect to Ubuntu Server from Linux Client Via Terminal, Specify the port Number, Suppose that your server ip 192.168.16.10 (any hostname) ,with port 39

at terminal

ssh username@192.168.16.10 -p 39

where username is exist username on that server you connect , -p : specify the port number.

At Vinagre Client , New Connection , then Specify the hostname:portnumber, enter image description here

share|improve this answer
add comment

If "connection refused" is exactly what you are getting, that means the TCP port you are trying to reach doesn't have any service listening on it. Maybe you are using a bad ssh command parameter, and the test is trying to reach original ssh port. You could listen multiple ports the same time, adding lines with the "Port" variable to "/etc/ssh/sshd_config" file. You could use "Port 22" and "Port 139", and check if test is trying to use port 22.

share|improve this answer
add comment

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.