Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Connect to localhost with SSH(PuTTy)

Tags:

putty

I just figured how to connect to my webhost with PuTTy .

But how to I connect to my localhost? I put

Servername: localhost port: 22 (I've tried 80 too)

And it gives me an error "failed to connect"

How do I connect?

like image 571
user71723 Avatar asked Jul 07 '10 05:07

user71723


2 Answers

If you are using Cygwin on your local host, you can connect to Cygwin's sshd (SSH Daemon).

3 easy commands to install the sshd as a service: (always there when you startup the machine)

$ ssh-host-config -y # enable sshd. "-y" answers yes to all queries.
$ cygrunsrv --start sshd # start it as an autostart Windows service
$ ssh localhost # try to recursively log in via ssh

Taken from: http://nfnaaron.posterous.com/tag/puttycyg#Section2 (The second approach)

=> You get the entire ssh infrastructure: public key authentication, ssh-agent, etc...

like image 94
Jan Avatar answered Oct 17 '22 23:10

Jan


Ensure that you have running a SSH server (such as openssh-server) running on localhost and not just a web server (such as apache). Also ensure, that localhost is really mapping to 127.0.0.0/8

like image 3
Florian Avatar answered Oct 17 '22 21:10

Florian