How to Connect to localhost with SSH(PuTTy)

user71723 picture user71723 · Jul 7, 2010 · Viewed 93.1k times · Source

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?

Answer

Jan picture Jan · Aug 4, 2010

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