Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to setup a remote ssh file server (sftp)

I've done it before but for some reason with ubuntu 10.10 I cannot connect to the assigned ssh port.

I setup the sshd_config file to listen on a specific port that didn't work so i changed back to the default :22

then I reinstalled because I couldn't get my samba shares to work either..

so from scratch I changed the port again and I didn't setup a private key file I just tried to connect via ssh over the local network

ssh Username@ ssh: Could not resolve hostname Name or service not known

every time no matter what I do I get that message if it's the wrong port it just says Connection refused is there some weird ip rule that is setup in Mav Meerkat? I've done this plenty of times and have been using Linux since Ubuntu 8.10 so I am not new to this Please Help!!

share|improve this question

ssh doesn't understand this address:port syntax.

Use just ssh Username@ if you use the standard port or ssh -p 1234 Username@ if you want to connect to port 1234

share|improve this answer
Yeah and this is the result ssh -p 1234 username@ Connection closed by any ideas? – Jerkofalltrades Dec 26 '10 at 4:11
The program on that port doesn't want to talk to your ssh client. Maybe it's not a ssh server. – Florian Diesch Dec 26 '10 at 12:26
Thanks I figured it out.. Like an idiot I removed the Host key files.. works like a champ now.. Thank you for your help – Jerkofalltrades Dec 26 '10 at 18:05

I deleted my Host key files *etc/ssh/ssh_host_rsa_key* *etc/ssh/ssh_host_dsa_key* on both my client and host machines somehow. so openssh server wouldn't allow any connections. reinstalled and it worked. but as florian said I was using the incorrect address:port syntax also.

share|improve this answer

Your Answer


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.