ssh:connect to host restart port 22: Connection refused
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
FWIW, this is what the installation looks like on my Ubuntu 8.10 box:
Code:
win32sux@candystore:~$ sudo apt-get install openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
rssh molly-guard openssh-blacklist openssh-blacklist-extra
The following NEW packages will be installed:
openssh-server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 285kB of archives.
After this operation, 782kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com intrepid/main openssh-server 1:5.1p1-3ubuntu1 [285kB]
Fetched 285kB in 2s (114kB/s)
Preconfiguring packages ...
Selecting previously deselected package openssh-server.
(Reading database ... 213706 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-server_1%3a5.1p1-3ubuntu1_i386.deb) ...
Processing triggers for ufw ...
Processing triggers for man-db ...
Setting up openssh-server (1:5.1p1-3ubuntu1) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
* Restarting OpenBSD Secure Shell server sshd [ OK ]
win32sux@candystore:~$ sudo netstat -pantu | grep LISTEN | grep ssh
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 19719/sshd
win32sux@candystore:~$ sudo /etc/init.d/ssh restart
* Restarting OpenBSD Secure Shell server sshd [ OK ]
win32sux@candystore:~$
Hey thanks for your reply & sorry for the delayed response. I did try to do the steps you have provided & the output shows that it listens in port 22.....if in future....say for example, I shutdown & restart the the Ubuntu machine......& wanted to restart the ssh....will there be the same prob??
Hey thanks for your reply & sorry for the delayed response. I did try to do the steps you have provided & the output shows that it listens in port 22.....if in future....say for example, I shutdown & restart the the Ubuntu machine......& wanted to restart the ssh....will there be the same prob??
I pretty sure last time infact 3 months back I did the same thing & I manually started.....it worked fine, recently I reinstalled the ubuntu...Its giving this issue, any ideas?? I had the same version 9.10 before & now
I pretty sure last time infact 3 months back I did the same thing & I manually started.....it worked fine, recently I reinstalled the ubuntu...Its giving this issue, any ideas?? I had the same version 9.10 before & now
Please let me know why its doing like if know.....But really thanks for your help & have a great day.
I pretty sure last time infact 3 months back I did the same thing & I manually started.....it worked fine, recently I reinstalled the ubuntu...Its giving this issue, any ideas?? I had the same version 9.10 before & now
Please let me know why its doing like if know.....But really thanks for your help & have a great day.
I haven't used 9.10 yet, but I couldn't imagine why the behavior would change by design. In any case, if this is a GUI box you can use the Services tool to manage the startup programs (I'm not sure if it's still called that in 9.10). On 8.10, it's accessible by going to System > Administration > Services. From the command line, you've got plenty of options (including manual editing of links). I've got sysv-rc-conf installed, which makes checks and tweaks very simple. Running a specific check for the SSH daemon I installed for illustrative purposes gives me (for example):
I haven't used 9.10 yet, but I couldn't imagine why the behavior would change by design. In any case, if this is a GUI box you can use the Services tool to manage the startup programs (I'm not sure if it's still called that in 9.10). On 8.10, it's accessible by going to System > Administration > Services. From the command line, you've got plenty of options (including manual editing of links). I've got sysv-rc-conf installed, which makes checks and tweaks very simple. Running a specific check for the SSH daemon I installed for illustrative purposes gives me (for example):
Hey Pal, thanks for that info which I just checked, my apologies for delayed response. surely will let you know & if I need any help, Please respond.....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.