SSh: Access Denied, Windows 10
I'm new to Linux in general but also even newer to the Window's 10 Ubuntu subsystem. I've been trying to set up ssh and so I set up a static ip address and logged into my router and forwarded port 22 as per usual. Using my public ip, I found a site that I was able to plug that into and the site confirmed that port 22 had indeed been forwarded.
After that I followed the instructions on the link https://superuser.com/questions/1111591/how-can-i-ssh-into-bash-on-ubuntu-on-windows-10
and installed openssh-server, added my username and set up my sshd_config file as such:
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
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 username
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
After setting up open ssh I tried using PuTTY to login to my server using my public IP as the address, myusername as the user and the user's password as the password and it gives me a
Access Denied
error message. I'm positive that I'm using the right password for that user name. Why am I still being denied access? If any of you can spot something amiss or maybe a step I missed, your help would be very appreciated.
ssh password remote-access windows-subsystem-for-linux
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'm new to Linux in general but also even newer to the Window's 10 Ubuntu subsystem. I've been trying to set up ssh and so I set up a static ip address and logged into my router and forwarded port 22 as per usual. Using my public ip, I found a site that I was able to plug that into and the site confirmed that port 22 had indeed been forwarded.
After that I followed the instructions on the link https://superuser.com/questions/1111591/how-can-i-ssh-into-bash-on-ubuntu-on-windows-10
and installed openssh-server, added my username and set up my sshd_config file as such:
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
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 username
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
After setting up open ssh I tried using PuTTY to login to my server using my public IP as the address, myusername as the user and the user's password as the password and it gives me a
Access Denied
error message. I'm positive that I'm using the right password for that user name. Why am I still being denied access? If any of you can spot something amiss or maybe a step I missed, your help would be very appreciated.
ssh password remote-access windows-subsystem-for-linux
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
What do ssh's logs report?
– muru
Nov 18 '16 at 16:32
I've tried to look for the /var/log/auth.log and I'm told that there is No such file or directory
– lehast22
Nov 18 '16 at 16:38
Are you running your wsl elevated ?
– Aserre
Dec 5 '16 at 12:57
You cannot run WSL "elevated". It is a kernel-level component. Can you tell us your Windows 10 build number? Before a certain build, it was impossible to connect to network reliably from inside WSL instance.
– Erkin Alp Güney
May 12 '17 at 18:56
Probably you should open port 22 in your Windows Firewall: tomshardware.co.uk/faq/id-3114787/…
– pa4080
Apr 30 '18 at 15:13
add a comment |
I'm new to Linux in general but also even newer to the Window's 10 Ubuntu subsystem. I've been trying to set up ssh and so I set up a static ip address and logged into my router and forwarded port 22 as per usual. Using my public ip, I found a site that I was able to plug that into and the site confirmed that port 22 had indeed been forwarded.
After that I followed the instructions on the link https://superuser.com/questions/1111591/how-can-i-ssh-into-bash-on-ubuntu-on-windows-10
and installed openssh-server, added my username and set up my sshd_config file as such:
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
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 username
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
After setting up open ssh I tried using PuTTY to login to my server using my public IP as the address, myusername as the user and the user's password as the password and it gives me a
Access Denied
error message. I'm positive that I'm using the right password for that user name. Why am I still being denied access? If any of you can spot something amiss or maybe a step I missed, your help would be very appreciated.
ssh password remote-access windows-subsystem-for-linux
I'm new to Linux in general but also even newer to the Window's 10 Ubuntu subsystem. I've been trying to set up ssh and so I set up a static ip address and logged into my router and forwarded port 22 as per usual. Using my public ip, I found a site that I was able to plug that into and the site confirmed that port 22 had indeed been forwarded.
After that I followed the instructions on the link https://superuser.com/questions/1111591/how-can-i-ssh-into-bash-on-ubuntu-on-windows-10
and installed openssh-server, added my username and set up my sshd_config file as such:
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
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 username
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
After setting up open ssh I tried using PuTTY to login to my server using my public IP as the address, myusername as the user and the user's password as the password and it gives me a
Access Denied
error message. I'm positive that I'm using the right password for that user name. Why am I still being denied access? If any of you can spot something amiss or maybe a step I missed, your help would be very appreciated.
ssh password remote-access windows-subsystem-for-linux
ssh password remote-access windows-subsystem-for-linux
edited Mar 20 '17 at 10:18
Community♦
1
1
asked Nov 18 '16 at 16:24
lehast22lehast22
612
612
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 13 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
What do ssh's logs report?
– muru
Nov 18 '16 at 16:32
I've tried to look for the /var/log/auth.log and I'm told that there is No such file or directory
– lehast22
Nov 18 '16 at 16:38
Are you running your wsl elevated ?
– Aserre
Dec 5 '16 at 12:57
You cannot run WSL "elevated". It is a kernel-level component. Can you tell us your Windows 10 build number? Before a certain build, it was impossible to connect to network reliably from inside WSL instance.
– Erkin Alp Güney
May 12 '17 at 18:56
Probably you should open port 22 in your Windows Firewall: tomshardware.co.uk/faq/id-3114787/…
– pa4080
Apr 30 '18 at 15:13
add a comment |
What do ssh's logs report?
– muru
Nov 18 '16 at 16:32
I've tried to look for the /var/log/auth.log and I'm told that there is No such file or directory
– lehast22
Nov 18 '16 at 16:38
Are you running your wsl elevated ?
– Aserre
Dec 5 '16 at 12:57
You cannot run WSL "elevated". It is a kernel-level component. Can you tell us your Windows 10 build number? Before a certain build, it was impossible to connect to network reliably from inside WSL instance.
– Erkin Alp Güney
May 12 '17 at 18:56
Probably you should open port 22 in your Windows Firewall: tomshardware.co.uk/faq/id-3114787/…
– pa4080
Apr 30 '18 at 15:13
What do ssh's logs report?
– muru
Nov 18 '16 at 16:32
What do ssh's logs report?
– muru
Nov 18 '16 at 16:32
I've tried to look for the /var/log/auth.log and I'm told that there is No such file or directory
– lehast22
Nov 18 '16 at 16:38
I've tried to look for the /var/log/auth.log and I'm told that there is No such file or directory
– lehast22
Nov 18 '16 at 16:38
Are you running your wsl elevated ?
– Aserre
Dec 5 '16 at 12:57
Are you running your wsl elevated ?
– Aserre
Dec 5 '16 at 12:57
You cannot run WSL "elevated". It is a kernel-level component. Can you tell us your Windows 10 build number? Before a certain build, it was impossible to connect to network reliably from inside WSL instance.
– Erkin Alp Güney
May 12 '17 at 18:56
You cannot run WSL "elevated". It is a kernel-level component. Can you tell us your Windows 10 build number? Before a certain build, it was impossible to connect to network reliably from inside WSL instance.
– Erkin Alp Güney
May 12 '17 at 18:56
Probably you should open port 22 in your Windows Firewall: tomshardware.co.uk/faq/id-3114787/…
– pa4080
Apr 30 '18 at 15:13
Probably you should open port 22 in your Windows Firewall: tomshardware.co.uk/faq/id-3114787/…
– pa4080
Apr 30 '18 at 15:13
add a comment |
1 Answer
1
active
oldest
votes
One thing to suspect when your SSH login is rejected with no apparent reason is whether the server has security updates due. In such a case OpenSSH denies any login attempt without even logging it.
Type sudo apt update && sudo apt upgrade
at the server's local terminal and see if anything changes.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f850913%2fssh-access-denied-windows-10%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
One thing to suspect when your SSH login is rejected with no apparent reason is whether the server has security updates due. In such a case OpenSSH denies any login attempt without even logging it.
Type sudo apt update && sudo apt upgrade
at the server's local terminal and see if anything changes.
add a comment |
One thing to suspect when your SSH login is rejected with no apparent reason is whether the server has security updates due. In such a case OpenSSH denies any login attempt without even logging it.
Type sudo apt update && sudo apt upgrade
at the server's local terminal and see if anything changes.
add a comment |
One thing to suspect when your SSH login is rejected with no apparent reason is whether the server has security updates due. In such a case OpenSSH denies any login attempt without even logging it.
Type sudo apt update && sudo apt upgrade
at the server's local terminal and see if anything changes.
One thing to suspect when your SSH login is rejected with no apparent reason is whether the server has security updates due. In such a case OpenSSH denies any login attempt without even logging it.
Type sudo apt update && sudo apt upgrade
at the server's local terminal and see if anything changes.
edited Apr 30 '18 at 15:01
answered Apr 30 '18 at 14:31
Arya PourtabatabaieArya Pourtabatabaie
12
12
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f850913%2fssh-access-denied-windows-10%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What do ssh's logs report?
– muru
Nov 18 '16 at 16:32
I've tried to look for the /var/log/auth.log and I'm told that there is No such file or directory
– lehast22
Nov 18 '16 at 16:38
Are you running your wsl elevated ?
– Aserre
Dec 5 '16 at 12:57
You cannot run WSL "elevated". It is a kernel-level component. Can you tell us your Windows 10 build number? Before a certain build, it was impossible to connect to network reliably from inside WSL instance.
– Erkin Alp Güney
May 12 '17 at 18:56
Probably you should open port 22 in your Windows Firewall: tomshardware.co.uk/faq/id-3114787/…
– pa4080
Apr 30 '18 at 15:13