Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

SSH problem...

I have Linux Subsystem running in windows. My config file is here:
PHP Code

<?php 
# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
Port 2234
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
ListenAddress 127.0.0.1
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey 
/etc/ssh/ssh_host_dsa_key
HostKey 
/etc/ssh/ssh_host_ecdsa_key
HostKey 
/etc/ssh/ssh_host_ed25519_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation no

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 1024

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin no
AllowUsers tak
@127.0.0.1 development
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile    %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes 
I've restart ssh service both in linux and windows to make sure everything is going fine.
However when I try to connect using
Code
ssh development@localhost -p 2234
I get an error saying:
Code
ssh: connect to host localhost port 2234: Connection refused
I've made sure the password is correct... no idea why it's refusing though :/
It was working well last night though, haven't changed anything since then.
Have a cool signature? hit me up and I might use it.
If you trying to connect from one OS to other, you need to use host name or IP address. Localhost is applicable when client and server run on the same machine.
(Dec 1, 2016 11:11 PM)archangel.dmitry Wrote:  If you trying to connect from one OS to other, you need to use host name or IP address. Localhost is applicable when client and server run on the same machine.

Linux subsystem runs inside windows on the same IP, on the same machine, under the same OS (it's subsystem feature, not VM)
Have a cool signature? hit me up and I might use it.
What is Linux subsystem in Windows?
(Dec 1, 2016 11:31 PM)archangel.dmitry Wrote:  What is Linux subsystem in Windows?

A feature in Windows 10 that was released on Anniversary update, it provides a Linux environment for developers, it can also access Windows system, you can think of it as having dual system at same time, ofc it's not real dual system and still have limitations.
Have a cool signature? hit me up and I might use it.
Did you bridge the connection?
(Dec 2, 2016 12:07 AM)severos Wrote:  A feature in Windows 10 that was released on Anniversary update, it provides a Linux environment for developers, it can also access Windows system, you can think of it as having dual system at same time, ofc it's not real dual system and still have limitations.

No offense, but your question has nothing to do with Linux. You should look for help in Windows 10 section.

Check the link below, it could be helpful.
http://superuser.com/questions/1111591/h...windows-10
(Dec 2, 2016 12:13 AM)8lue7ornado Wrote:  Did you bridge the connection?
Not sure I understand you, why would I need to bridge the connection? I have a firewall rule to allow inbound connections, but never read about bridging the connection, there's no VM here, the subsystem is running directly on top of windows.
(Dec 2, 2016 12:15 AM)archangel.dmitry Wrote:  No offense, but your question has nothing to do with Linux. You should look for help in Windows 10 section.

Check the link below, it could be helpful.
http://superuser.com/questions/1111591/h...windows-10
I've already tried that, it's how I got it running for the last week, but out of blue it doesn't work today...
My question is related to Linux more than Windows since I was asking about what could be causing the error in ssh, which I believe Linux users are more used to them than Windows users. What are the possibilities to refuse an ssh connection?? other than a wrong password/username/port ?
Have a cool signature? hit me up and I might use it.
Did you check if sshd is listening on port?
(Dec 2, 2016 12:34 AM)archangel.dmitry Wrote:  Did you check if sshd is listening on port?

This seems to be the problem, sshd stops listening whenever I close the bash window and have to restart it...
Have a cool signature? hit me up and I might use it.
(Dec 2, 2016 12:33 AM)severos Wrote:  Not sure I understand you, why would I need to bridge the connection? I have a firewall rule to allow inbound connections, but never read about bridging the connection, there's no VM here, the subsystem is running directly on top of windows.

Ops my bad, misunderstood that it was a vm!
(Dec 2, 2016 01:08 AM)severos Wrote:  This seems to be the problem, sshd stops listening whenever I close the bash window and have to restart it...

For this issue you're running it foreground and not as daemon service.

commands "nohup", "&" will help you out.

box@box#: nohup [program] &
// This will run the program in the background allowing you to exit bash window without
// exiting program.
(Dec 2, 2016 02:11 AM)Freshnuts Wrote:  For this issue you're running it foreground and not as daemon service.

commands "nohup", "&" will help you out.

box@box#: nohup [program] &
// This will run the program in the background allowing you to exit bash window without
// exiting program.

I thought "sudo service ssh start" does start the sshd
Have a cool signature? hit me up and I might use it.
(Dec 2, 2016 02:11 AM)Freshnuts Wrote:  For this issue you're running it foreground and not as daemon service.

commands "nohup", "&" will help you out.

box@box#: nohup [program] &
// This will run the program in the background allowing you to exit bash window without
// exiting program.

He might be on to something. I wounder, if sshd does not fork out properly from bash. "&" using should help to resolve the issue as it was stated.
(Dec 2, 2016 06:46 AM)archangel.dmitry Wrote:  He might be on to something. I wounder, if sshd does not fork out properly from bash. "&" using should help to resolve the issue as it was stated.

Didn't help, this seems to be a problem in the implementation of Linux subsystem (Windows problem) daemons won't run as windows service, keeping a shell open keeps the service running and solves the problem though.
Thanks all for the help :)
Have a cool signature? hit me up and I might use it.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by Ki11MachJan 4, 2019 07:12 PM 2 126 Jan 4, 2019 07:12 PM
Last Post: Ki11Mach
by BLOW.Aug 25, 2016 08:30 AM 9 325 Aug 25, 2016 08:30 AM
Last Post: BLOW.
[Ubuntu] by ♥Quantum♥Oct 28, 2014 02:30 AM 7 104 Oct 28, 2014 02:30 AM
Last Post: GamingManiac