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.

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@192.168.2.1:22 ssh: Could not resolve hostname 192.168.2.1:22: 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
add comment

2 Answers

ssh doesn't understand this address:port syntax.

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

share|improve this answer
    
Yeah and this is the result ssh -p 1234 username@192.168.2.1 Connection closed by 192.168.2.1 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
add comment

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
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.