ssh: connect to host localhost port 22: Connection refused

sagarnikam123

New member
Local time
3:46 PM
Messages
6
Location
Bangalore
i am on windows-64 bit hp machne.
i installed first latest cygwin(from local directory) to run hadoop on windows,but forgot to install tcp_wrappers pacakge.
so i deleted everything in C drive related to cygwin,also .ssh folder & .bashrc.profile
& installed again cygwin freshly.

i follow this tutorial:-http://v-lad.org/Tutorials/Hadoop/00%20-%20Intro.html
& run below command (u can see this commands in snapshot)

====================================================
trendwise@trendwise-HP ~
$ ssh-host-config

*** Info: Generating /etc/ssh_host_key
*** Info: Generating /etc/ssh_host_rsa_key
*** Info: Generating /etc/ssh_host_dsa_key
*** Info: Generating /etc/ssh_host_ecdsa_key
*** Info: Creating default /etc/ssh_config file
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/READ ME.privsep.
*** Query: Should privilege separation be used? (yes/no) no
*** Info: Updating /etc/sshd_config file

*** Info: Sshd service is already installed.

*** Info: Host configuration finished. Have fun!

trendwise@trendwise-HP ~
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/trendwise/.ssh/id_rsa):
Created directory '/home/trendwise/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/trendwise/.ssh/id_rsa.
Your public key has been saved in /home/trendwise/.ssh/id_rsa.pub.
The key fingerprint is:
93:50:59:ac:c2:3a:ff:db:33:7e:ab:a9:bb:34:a5:cf trendwise@trendwise-HP
The key's randomart image is:
+--[ RSA 2048]----+
| .+. |
| .. . |
| .. . |
| o... |
| . .S . |
| o + |
| o + |
| .. =o.. |
| .**E=.. |
+-----------------+

trendwise@trendwise-HP ~
$ cd ~/.ssh

trendwise@trendwise-HP ~/.ssh
$ ls -l
total 5
-rw------- 1 trendwise None 1679 Oct 16 20:22 id_rsa
-rw-r--r-- 1 trendwise None 404 Oct 16 20:22 id_rsa.pub

trendwise@trendwise-HP ~/.ssh
$ cat id_rsa.pub >> authorized_keys

trendwise@trendwise-HP ~/.ssh
$ ssh localhost
ssh: connect to host localhost port 22: Connection refused
====================================================



when i am going to start ssh localhost it says that
"ssh: connect to host localhost port 22: Connection refused "(see snapshot)

In Services, "Cygwinsshd" as service is already present there,but not started,
i don't know how to remove it from services(see snapshot)


cygwin_sshd_present.png

cygwin_sshd_already_started.png

port_22_refused.png

Any how i want to start sshd server to run hadoop on windows,what should i do with port,or any other option,,plz i am installing it from last 2 days
 

My Computer My Computer

At a glance

64 bit
OS
64 bit
go to the "enviroment variables" (right click on computer-->properties-->advance .. -->enviroment variables)
click on "new" button: name="CYGWIN" value="ntsec tty"
then: start-->service.msc-->right click on cygwin service and start
now run blow command:
ssh-host-config -y



i'm working on hadoop too, i'll be happy if we could share our information, if you agree with me just mail to:
[email protected]

B.R.
 

My Computer My Computer

At a glance

win7 32bit(x86)
OS
win7 32bit(x86)
Welcome to Seven Forums mohammad59mt. Looks like a good help post. All geek to me though :geek:

A Guy
 

My Computer My Computer

At a glance

Windows 10 Home x64INTEL Core i5-750 Quad-Core 3.37GHzHyperX Fury Black Series 8GB (2 x 4GB) 1866MhzEVGA GeForce GTX 750 Superclocked 1GB 128-Bit...
Computer type
PC/Desktop
OS
Windows 10 Home x64
CPU
INTEL Core i5-750 Quad-Core 3.37GHz
Motherboard
ASUS P7P55D
Memory
HyperX Fury Black Series 8GB (2 x 4GB) 1866Mhz
Graphics Card(s)
EVGA GeForce GTX 750 Superclocked 1GB 128-Bit GDDR5
Monitor(s) Displays
LG 32MA68HY 32" IPS
Screen Resolution
1920 x 1080
Hard Drives
Samsung 840 Evo 120GB, SEAGATE 500GB Barracuda® 7200.12, SATA 3 Gb/s, 7200 RPM, 16MB cache
PSU
ANTEC TruePower New TP-550, 80 PLUS, 550W
Case
ANTEC Three Hundred Illusion
Cooling
COOLER MASTER Hyper 212 Plus, 4 x 120mm 1 x 140mm Noctua's
Internet Speed
85 + Mbps
Antivirus
Avast
Browser
Vivaldi
Thanks for you valuable post mohammad59mt. I have followed the same steps as you mentioned but Now I am encountering another problem as
$ ssh localhost
Connection closed by::1

Please help me in this I am also trying to install CYGWIN to do some hands on Hadoop.

Thanks in advance for your reply.

Thanks,
JaanVivek
 

My Computer My Computer

At a glance

windows7 ultimate 32 bit
OS
windows7 ultimate 32 bit
connection closed by ::1

i too have encountered with this problem while installing hbase. what to do??
 

My Computer My Computer

At a glance

windows 7 x64
Computer type
PC/Desktop
Computer Manufacturer/Model Number
dell
OS
windows 7 x64
Back
Top