LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-04-2010, 12:08 PM   #1
twaddlac
Member
 
Registered: Jun 2010
Posts: 34

Rep: Reputation: 0
Passwords fo SSH won't work


Hello,

I am running an Ubuntu 64-bit and Windows 7 64-bit machine and I have set up an SSH between them and for whatever reason the passwords won't work; I receive the following error when trying to log on from either computer:

Code:
permission denied (public key, password)
I own both of the computers so I have full reign over them, so I'm assuming it should be an easy fix but I'm not sure about what to do. Please let me know if you have any suggestions! Thank you very much!
 
Old 10-04-2010, 12:10 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Please post the command you are using to connect, your log-files and your config-files.
 
Old 10-04-2010, 01:21 PM   #3
twaddlac
Member
 
Registered: Jun 2010
Posts: 34

Original Poster
Rep: Reputation: 0
I have tried both:

Code:
ssh -R 22:localhost:22 client_ip
ssh client_ip
on both machines and I was able to access them but I have not been able to get the password correct.

sshd config:
Code:
# Package generated configuration file
# See the sshd_config(5) manpage for details

# What ports, IPs and protocols we listen for
#Port 22
Port 22
Port 19999
# 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
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

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

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
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
# 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,
# 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
ssh config:
Code:
# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no
logfile:
Code:
Oct  4 00:17:01 alan-desktop CRON[29843]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 00:17:01 alan-desktop CRON[29843]: pam_unix(cron:session): session closed for user root
Oct  4 01:17:01 alan-desktop CRON[29850]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 01:17:01 alan-desktop CRON[29850]: pam_unix(cron:session): session closed for user root
Oct  4 02:17:01 alan-desktop CRON[29857]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 02:17:01 alan-desktop CRON[29857]: pam_unix(cron:session): session closed for user root
Oct  4 03:17:01 alan-desktop CRON[29864]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 03:17:01 alan-desktop CRON[29864]: pam_unix(cron:session): session closed for user root
Oct  4 04:17:01 alan-desktop CRON[29871]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 04:17:01 alan-desktop CRON[29871]: pam_unix(cron:session): session closed for user root
Oct  4 05:17:01 alan-desktop CRON[29878]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 05:17:01 alan-desktop CRON[29878]: pam_unix(cron:session): session closed for user root
Oct  4 06:17:01 alan-desktop CRON[29885]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 06:17:01 alan-desktop CRON[29885]: pam_unix(cron:session): session closed for user root
Oct  4 06:25:01 alan-desktop CRON[29890]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 06:25:01 alan-desktop CRON[29890]: pam_unix(cron:session): session closed for user root
Oct  4 07:17:01 alan-desktop CRON[29896]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 07:17:01 alan-desktop CRON[29896]: pam_unix(cron:session): session closed for user root
Oct  4 07:30:01 alan-desktop CRON[29901]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 07:30:01 alan-desktop CRON[29901]: pam_unix(cron:session): session closed for user root
Oct  4 08:17:01 alan-desktop CRON[30039]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 07:30:01 alan-desktop CRON[29901]: pam_unix(cron:session): session closed for user root
Oct  4 08:17:01 alan-desktop CRON[30039]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 08:17:01 alan-desktop CRON[30039]: pam_unix(cron:session): session closed for user root
Oct  4 09:17:01 alan-desktop CRON[30046]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 09:17:01 alan-desktop CRON[30046]: pam_unix(cron:session): session closed for user root
Oct  4 10:17:01 alan-desktop CRON[30053]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 10:17:01 alan-desktop CRON[30053]: pam_unix(cron:session): session closed for user root
Oct  4 10:25:05 alan-desktop sshd[30061]: Accepted password for alan from 192.168.1.2 port 49225 ssh2
Oct  4 10:25:05 alan-desktop sshd[30061]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  4 10:33:11 alan-desktop sudo:     alan : TTY=pts/0 ; PWD=/home/alan ; USER=root ; COMMAND=/usr/bin/apt-get isntall putty-tools
Oct  4 10:33:17 alan-desktop sudo:     alan : TTY=pts/0 ; PWD=/home/alan ; USER=root ; COMMAND=/usr/bin/apt-get install putty-tools
Oct  4 10:34:16 alan-desktop sshd[30236]: Accepted password for alan from 192.168.1.4 port 55696 ssh2
Oct  4 10:34:16 alan-desktop sshd[30236]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  4 10:34:17 alan-desktop sshd[30303]: subsystem request for sftp
Oct  4 10:47:48 alan-desktop sshd[30236]: pam_unix(sshd:session): session closed for user alan
Oct  4 10:47:50 alan-desktop sshd[30061]: pam_unix(sshd:session): session closed for user alan
Oct  4 10:48:03 alan-desktop sshd[30315]: Accepted password for alan from 192.168.1.2 port 49522 ssh2
Oct  4 10:48:03 alan-desktop sshd[30315]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  4 10:58:31 alan-desktop sshd[30407]: Accepted password for alan from ::1 port 51607 ssh2
Oct  4 10:58:31 alan-desktop sshd[30407]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  4 10:59:42 alan-desktop sshd[30472]: Received disconnect from ::1: 11: disconnected by user
Oct  4 10:58:31 alan-desktop sshd[30407]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  4 10:59:42 alan-desktop sshd[30472]: Received disconnect from ::1: 11: disconnected by user
Oct  4 10:59:42 alan-desktop sshd[30407]: pam_unix(sshd:session): session closed for user alan
Oct  4 11:00:28 alan-desktop sshd[30504]: Accepted password for alan from ::1 port 46438 ssh2
Oct  4 11:00:28 alan-desktop sshd[30504]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  4 11:01:21 alan-desktop sshd[30568]: Received disconnect from ::1: 11: disconnected by user
Oct  4 11:01:21 alan-desktop sshd[30504]: pam_unix(sshd:session): session closed for user alan
Oct  4 11:01:44 alan-desktop sshd[30600]: Accepted password for alan from 192.168.1.4 port 59471 ssh2
Oct  4 11:01:44 alan-desktop sshd[30600]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  4 11:01:44 alan-desktop sshd[30667]: subsystem request for sftp
Oct  4 11:04:17 alan-desktop sshd[30600]: pam_unix(sshd:session): session closed for user alan
Oct  4 11:09:35 alan-desktop sshd[30315]: pam_unix(sshd:session): session closed for user alan
Oct  4 11:10:42 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  4 11:11:17 alan-desktop sudo:     alan : TTY=pts/0 ; PWD=/home/alan ; USER=root ; COMMAND=/usr/bin/apt-get install ssh-server ssh-client
Oct  4 11:11:42 alan-desktop sudo:     alan : TTY=pts/0 ; PWD=/home/alan ; USER=root ; COMMAND=/usr/bin/apt-get install openssh-server openssh-client
Oct  4 11:17:01 alan-desktop CRON[30728]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 11:17:01 alan-desktop CRON[30728]: pam_unix(cron:session): session closed for user root
Oct  4 12:17:01 alan-desktop CRON[30739]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 12:17:01 alan-desktop CRON[30739]: pam_unix(cron:session): session closed for user root
Oct  4 12:21:16 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  4 12:21:39 alan-desktop sshd[30751]: Accepted password for alan from 192.168.1.2 port 49499 ssh2
Oct  4 12:21:16 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  4 12:21:39 alan-desktop sshd[30751]: Accepted password for alan from 192.168.1.2 port 49499 ssh2
Oct  4 12:21:39 alan-desktop sshd[30751]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  4 12:33:19 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  4 12:35:49 alan-desktop sshd[30870]: Accepted password for alan from ::1 port 44243 ssh2
Oct  4 12:35:49 alan-desktop sshd[30870]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  4 12:58:35 alan-desktop sshd[30751]: pam_unix(sshd:session): session closed for user alan
Oct  4 13:00:04 alan-desktop sshd[31012]: Invalid user Alan from 192.168.1.2
Oct  4 13:00:04 alan-desktop sshd[31012]: Failed none for invalid user Alan from 192.168.1.2 port 49728 ssh2
Oct  4 13:00:08 alan-desktop sshd[31012]: pam_unix(sshd:auth): check pass; user unknown
Oct  4 13:00:08 alan-desktop sshd[31012]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=alan-pc.local
Oct  4 13:00:10 alan-desktop sshd[31012]: Failed password for invalid user Alan from 192.168.1.2 port 49728 ssh2
Oct  4 13:00:18 alan-desktop sshd[31012]: pam_unix(sshd:auth): check pass; user unknown
Oct  4 13:00:20 alan-desktop sshd[31012]: Failed password for invalid user Alan from 192.168.1.2 port 49728 ssh2
Oct  4 13:00:27 alan-desktop sshd[31012]: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=alan-pc.local
Oct  4 13:06:32 alan-desktop sshd[31020]: Invalid user Alan from 192.168.1.2
Oct  4 13:06:32 alan-desktop sshd[31020]: Failed none for invalid user Alan from 192.168.1.2 port 49746 ssh2
Oct  4 13:06:36 alan-desktop sshd[31020]: pam_unix(sshd:auth): check pass; user unknown
Oct  4 13:06:36 alan-desktop sshd[31020]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=alan-pc.local
Oct  4 13:06:38 alan-desktop sshd[31020]: Failed password for invalid user Alan from 192.168.1.2 port 49746 ssh2
Oct  4 13:06:48 alan-desktop sshd[31023]: Invalid user Alan from 192.168.1.2
Oct  4 13:06:48 alan-desktop sshd[31023]: Failed none for invalid user Alan from 192.168.1.2 port 49747 ssh2
Oct  4 13:06:48 alan-desktop sshd[31023]: Invalid user Alan from 192.168.1.2
Oct  4 13:06:48 alan-desktop sshd[31023]: Failed none for invalid user Alan from 192.168.1.2 port 49747 ssh2
Oct  4 13:06:51 alan-desktop sshd[31023]: pam_unix(sshd:auth): check pass; user unknown
Oct  4 13:06:51 alan-desktop sshd[31023]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=alan-pc.local
Oct  4 13:06:53 alan-desktop sshd[31023]: Failed password for invalid user Alan from 192.168.1.2 port 49747 ssh2
Oct  4 13:06:57 alan-desktop sshd[31023]: pam_unix(sshd:auth): check pass; user unknown
Oct  4 13:06:59 alan-desktop sshd[31023]: Failed password for invalid user Alan from 192.168.1.2 port 49747 ssh2
Oct  4 13:07:03 alan-desktop sshd[31023]: pam_unix(sshd:auth): check pass; user unknown
Oct  4 13:07:05 alan-desktop sshd[31023]: Failed password for invalid user Alan from 192.168.1.2 port 49747 ssh2
Oct  4 13:07:05 alan-desktop sshd[31023]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=alan-pc.local
Oct  4 13:17:01 alan-desktop CRON[31025]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 13:17:01 alan-desktop CRON[31025]: pam_unix(cron:session): session closed for user root
Oct  4 13:42:34 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  4 13:47:47 alan-desktop sudo:     alan : TTY=pts/2 ; PWD=/home/alan ; USER=root ; COMMAND=/usr/bin/apt-get install gedit
Oct  4 13:49:24 alan-desktop sudo:     alan : TTY=pts/2 ; PWD=/home/alan ; USER=root ; COMMAND=/bin/open gedit /etc/ssh/ssh_config
Oct  4 14:04:25 alan-desktop sshd[31186]: Accepted password for alan from 192.168.1.2 port 49856 ssh2
Oct  4 14:04:25 alan-desktop sshd[31186]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  4 14:13:28 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  4 14:17:01 alan-desktop CRON[31390]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  4 14:17:01 alan-desktop CRON[31390]: pam_unix(cron:session): session closed for user root
Thank you and let me know if you need anything else!
 
Old 10-04-2010, 01:21 PM   #4
twaddlac
Member
 
Registered: Jun 2010
Posts: 34

Original Poster
Rep: Reputation: 0
I should also say that I can connect to the Ubuntu machine with putty, but not with ssh from cygwin
 
Old 10-04-2010, 01:40 PM   #5
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
are you using the same key through cygwin as you are in putty??? If so, the format is different in putty than a standard ssh key

*edit

if the above is the case, you can export your putty key to use in cygwin by doing the following:
1. Download and open PuTTYgen
2. In PuTTYgen, select: Conversions » Load Private Key
3. Browse to your private PuTTY key and select Open.
You should be required to enter your private key passphrase.
4. Select: Conversions » Export OpenSSH Key
Select a place to put your keys such as your home directory; name it something like openssh-key.
5. To save the public key, follow the same instructions for creating the openssh-key.pub file as above.

Last edited by bret381; 10-04-2010 at 01:44 PM.
 
Old 10-04-2010, 01:47 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
I see in your logs that you have successfull connected as user "alan", I assume that this are your tries with putty.
And I see that you failed to connect as user "Alan", I assume that this were your tries with ssh from cygwin.
Can you connect as user "alan" from cygwin's ssh?
 
Old 10-04-2010, 03:14 PM   #7
twaddlac
Member
 
Registered: Jun 2010
Posts: 34

Original Poster
Rep: Reputation: 0
Quote:
Browse to your private PuTTY key and select Open
Is there a default place that PuTTy stores this file or some unique characteristic that I can search for - I can't seem to find it and I don't recall doing this in the setup procedure.

Quote:
Can you connect as user "alan" from cygwin's ssh?
Yes, I can connect via cygwin ssh but the password is rejected on this, too.
 
Old 10-04-2010, 09:50 PM   #8
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
are you using public key authentication, or just a password??? I guess I should have asked that first

but, putty uses a .ppk file type
******************************************

On a side note, just for security, I would change

PermitRootLogin yes
to
PermitRootLogin no

Last edited by bret381; 10-04-2010 at 09:51 PM.
 
Old 10-04-2010, 09:59 PM   #9
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
Quote:
Originally Posted by TobiSGD View Post
I see in your logs that you have successfull connected as user "alan", I assume that this are your tries with putty.
And I see that you failed to connect as user "Alan", I assume that this were your tries with ssh from cygwin.
Can you connect as user "alan" from cygwin's ssh?
I think what TobiSGD was trying to say is that in the logs all failed attempts came from user Alan.

Failed password for invalid user Alan from 192.168.1.2 port 49746 ssh2

Where as any attempt to connect as user alan gave

Accepted password for alan

make sure that in cygwin, you are connecting with user alan and not Alan as they are not the same....

How are you connecting through cygwin? shh 192.*.*.* ?
or ssh -l alan 192.*.*.* ?

the latter will log you in as alan. If your account name is Alan on your Windows PC, I think that cygwin will use that as the username. Make sure you are passing a user to ssh to login.

I think this will solve your problem
 
1 members found this post helpful.
Old 10-05-2010, 10:21 AM   #10
twaddlac
Member
 
Registered: Jun 2010
Posts: 34

Original Poster
Rep: Reputation: 0
Quote:
are you using public key authentication, or just a password???
I'm just using a password; should I use a public key or both?

Quote:
How are you connecting through cygwin? shh 192.*.*.* ?
Yes, I have been trying to connect via ssh 192.* - I have been able to ping to it for a very short time but could only send 4 packets then it stopped.

Quote:
or ssh -l alan 192.*.*.*
When I used this I received the error:
Code:
bad local forwarding specification 'alan'
What does this mean? How should I try to fix this?
 
Old 10-05-2010, 10:50 AM   #11
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
the L option just passes a username to ssh. So if you are on a *nix box under the name bob and you try to ssh into your *nix box at home under the name alan, and you use ssh 192.*.*.*, ssh will try to log bob into your home computer. with the L option (-l) ssh -l alan 192.*.*.*, it will pass the username alan to ssh to allow you to login in under that name.

Make sure you are using a lower case l and not upper case. the upper case L is used to bind to an address... I think this is what is giving you the error.



as far as a public key, yes it is safer to turn off passwords and only use public keys to authenticate... But we can get to that after we get you logged in
 
1 members found this post helpful.
Old 10-05-2010, 11:01 AM   #12
twaddlac
Member
 
Registered: Jun 2010
Posts: 34

Original Poster
Rep: Reputation: 0
Thank you very much!! Well I am now able to connect to my Ubuntu machine via cyqwin ssh! However, it doesn't seem to be the case when trying to access the Windows machine via Ubuntu ssh

I receive the error:
Code:
Permission denied (publickey, password)
though I think it successfully passed the Windows username since the 'A' is capitalized! So it's a start!
 
Old 10-05-2010, 11:11 AM   #13
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 79
I'm not real sure where cygwin stores it's error logs, but start with your error logs and try to find what is giving you the errors. If you can post the errors, we can try to help
 
Old 10-05-2010, 12:02 PM   #14
twaddlac
Member
 
Registered: Jun 2010
Posts: 34

Original Poster
Rep: Reputation: 0
Quote:
I'm not real sure where cygwin stores it's error logs
They're found in /var/log/XWin.0.log



Here's what my cygwin log file has to say:
Code:
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.8.0.0 (10800000)
Build Date: 2010-04-02

Contact: cygwin-xfree@cygwin.com
XWin was started with the following command line:

X :0 -multiwindow 

ddxProcessArgument - Initializing default screens
winInitializeDefaultScreens - primary monitor w 1366 h 768
winInitializeDefaultScreens - native DPI x 96 y 96
winInitializeDefaultScreens - Returning
[  3634.464] winValidateArgs - g_iNumScreens: 1 iMaxConsecutiveScreen: 1
[  3634.464] (II) xorg.conf is not supported
[  3634.464] (II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
[  3634.480] LoadPreferences: /home/Alan/.XWinrc not found
[  3634.480] LoadPreferences: Loading /etc/X11/system.XWinrc
[  3634.495] LoadPreferences: Done parsing the configuration file...
[  3634.495] winGetDisplay: DISPLAY=:0.0
[  3634.495] winDetectSupportedEngines - Windows NT/2000/XP
[  3634.620] winDetectSupportedEngines - DirectDraw installed
[  3634.620] winDetectSupportedEngines - DirectDraw4 installed
[  3634.620] winDetectSupportedEngines - Returning, supported engines 00000007
[  3634.620] winSetEngine - Multi Window or Rootless => ShadowGDI
[  3634.620] winAdjustVideoModeShadowGDI - Using Windows display depth of 32 bits per pixel
[  3634.651] winAllocateFBShadowGDI - Creating DIB with width: 1366 height: 768 depth: 32
[  3634.651] winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
[  3634.651] winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
[  3634.682] null screen fn ReparentWindow
[  3634.682] null screen fn RestackWindow
[  3634.682] InitQueue - Calling pthread_mutex_init
[  3634.682] InitQueue - pthread_mutex_init returned
[  3634.682] InitQueue - Calling pthread_cond_init
[  3634.682] InitQueue - pthread_cond_init returned
[  3634.682] winInitMultiWindowWM - Hello
[  3634.682] winInitMultiWindowWM - Calling pthread_mutex_lock ()
[  3634.682] winMultiWindowXMsgProc - Hello
[  3634.682] Screen 0 added at virtual desktop coordinate (0,0).
[  3634.682] winMultiWindowXMsgProc - Calling pthread_mutex_lock ()
[  3634.698] MIT-SHM extension disabled due to lack of kernel support
[  3634.729] XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel
[  3634.776] (II) AIGLX: Loaded and initialized /usr/lib/dri/swrast_dri.so
[  3634.776] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[  3634.823] [dix] Could not init font path element /usr/share/fonts/TTF/, removing from list!
[  3634.823] [dix] Could not init font path element /usr/share/fonts/OTF/, removing from list!
[  3634.823] [dix] Could not init font path element /usr/share/fonts/Type1/, removing from list!
[  3635.962] winPointerWarpCursor - Discarding first warp: 683 384
[  3635.962] (--) 5 mouse buttons found
[  3635.962] (--) Setting autorepeat to delay=500, rate=31
[  3635.962] (--) winConfigKeyboard - Layout: "00000409" (00000409) 
[  3635.962] (--) Using preset keyboard for "English (USA)" (409), type "7"
[  3635.962] Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options = "none"
[  3635.962] winInitMultiWindowWM - pthread_mutex_lock () returned.
[  3635.993] winInitMultiWindowWM - pthread_mutex_unlock () returned.
[  3635.993] winGetDisplay: DISPLAY=:0.0
[  3635.993] winInitMultiWindowWM - DISPLAY=:0.0
[  3635.993] winMultiWindowXMsgProc - pthread_mutex_lock () returned.
[  3635.993] winMultiWindowXMsgProc - pthread_mutex_unlock () returned.
[  3636.008] winProcEstablishConnection - Hello
[  3636.008] winInitClipboard ()
[  3636.008] winProcEstablishConnection - winInitClipboard returned.
[  3636.008] winClipboardProc - Hello
[  3636.008] DetectUnicodeSupport - Windows NT/2000/XP
[  3636.008] winGetDisplay: DISPLAY=:0.0
[  3636.008] winMultiWindowXMsgProc - DISPLAY=:0.0
[  3636.008] winGetDisplay: DISPLAY=:0.0
[  3636.008] winClipboardProc - DISPLAY=:0.0
[  3636.008] winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
[  3636.008] winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
[  3636.024] winClipboardProc - XOpenDisplay () returned and successfully opened the display.
[  5289.806] winDeinitMultiWindowWM - Noting shutdown in progress
[  5289.806] winClipboardProc - winClipboardFlushWindowsMessageQueue trapped WM_QUIT message, exiting main loop.
[  5289.806] winClipboardProc - XDestroyWindow succeeded.
[  5289.822] winClipboardIOErrorHandler!

[  5289.853] winDeinitMultiWindowWM - Noting shutdown in progress
I'll post my Ubuntu SSH log file as soon as I find it. Let me know if you need anything else!
 
Old 10-05-2010, 12:16 PM   #15
twaddlac
Member
 
Registered: Jun 2010
Posts: 34

Original Poster
Rep: Reputation: 0
Here's my log file for my Ubuntu machine - I hope it helps!

Code:
Oct  5 00:17:01 alan-desktop CRON[31914]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 00:17:01 alan-desktop CRON[31914]: pam_unix(cron:session): session closed for user root
Oct  5 01:17:02 alan-desktop CRON[31922]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 01:17:02 alan-desktop CRON[31922]: pam_unix(cron:session): session closed for user root
Oct  5 02:17:01 alan-desktop CRON[31930]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 02:17:01 alan-desktop CRON[31930]: pam_unix(cron:session): session closed for user root
Oct  5 03:17:01 alan-desktop CRON[31937]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 03:17:01 alan-desktop CRON[31937]: pam_unix(cron:session): session closed for user root
Oct  5 04:17:01 alan-desktop CRON[31945]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 04:17:01 alan-desktop CRON[31945]: pam_unix(cron:session): session closed for user root
Oct  5 05:17:01 alan-desktop CRON[31953]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 05:17:01 alan-desktop CRON[31953]: pam_unix(cron:session): session closed for user root
Oct  5 06:17:01 alan-desktop CRON[31961]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 06:17:01 alan-desktop CRON[31961]: pam_unix(cron:session): session closed for user root
Oct  5 06:25:01 alan-desktop CRON[31966]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 06:25:01 alan-desktop CRON[31966]: pam_unix(cron:session): session closed for user root
Oct  5 07:17:01 alan-desktop CRON[31973]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 07:17:01 alan-desktop CRON[31973]: pam_unix(cron:session): session closed for user root
Oct  5 07:30:01 alan-desktop CRON[31977]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 07:30:01 alan-desktop CRON[31977]: pam_unix(cron:session): session closed for user root
Oct  5 08:17:01 alan-desktop CRON[32149]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 08:17:01 alan-desktop CRON[32149]: pam_unix(cron:session): session closed for user root
Oct  5 09:17:01 alan-desktop CRON[32157]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 09:17:01 alan-desktop CRON[32157]: pam_unix(cron:session): session closed for user root
Oct  5 10:17:01 alan-desktop CRON[32165]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 10:17:01 alan-desktop CRON[32165]: pam_unix(cron:session): session closed for user root
Oct  5 10:54:10 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  5 11:01:18 alan-desktop sudo:     alan : TTY=pts/0 ; PWD=/home/alan ; USER=root ; COMMAND=/usr/bin/vim /etc/ssh/sshd_config
Oct  5 11:04:33 alan-desktop sudo:     alan : TTY=pts/0 ; PWD=/home/alan ; USER=root ; COMMAND=/sbin/iptables -A INPUT -p tcp --dport 22 -j ACCEPT
Oct  5 11:04:44 alan-desktop sudo:     alan : TTY=pts/0 ; PWD=/home/alan ; USER=root ; COMMAND=/sbin/iptables -A OUTPUT -p tcp --dport 22 -j ACCEPT
Oct  5 11:07:19 alan-desktop sudo:     alan : TTY=pts/0 ; PWD=/home/alan ; USER=root ; COMMAND=/etc/init.d/ssh restart
Oct  5 11:07:19 alan-desktop sshd[28968]: Received signal 15; terminating.
Oct  5 11:07:19 alan-desktop sshd[32526]: Server listening on 0.0.0.0 port 22.
Oct  5 11:07:19 alan-desktop sshd[32526]: Server listening on :: port 22.
Oct  5 11:14:26 alan-desktop sshd[32531]: Accepted password for alan from 192.168.1.2 port 49545 ssh2
Oct  5 11:14:26 alan-desktop sshd[32531]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  5 11:14:46 alan-desktop sshd[32531]: pam_unix(sshd:session): session closed for user alan
Oct  5 11:17:01 alan-desktop CRON[32629]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 11:17:01 alan-desktop CRON[32629]: pam_unix(cron:session): session closed for user root
Oct  5 11:18:19 alan-desktop sshd[32634]: Invalid user Alan from 192.168.1.2
Oct  5 11:18:19 alan-desktop sshd[32634]: Failed none for invalid user Alan from 192.168.1.2 port 49562 ssh2
Oct  5 11:18:22 alan-desktop sshd[32634]: pam_unix(sshd:auth): check pass; user unknown
Oct  5 11:18:22 alan-desktop sshd[32634]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=alan-pc.local
Oct  5 11:18:24 alan-desktop sshd[32634]: Failed password for invalid user Alan from 192.168.1.2 port 49562 ssh2
Oct  5 11:28:37 alan-desktop unix_chkpwd[32641]: password check failed for user (alan)
Oct  5 11:28:37 alan-desktop gnome-screensaver-dialog: pam_unix(gnome-screensaver:auth): authentication failure; logname= uid=1000 euid=1000 tty=:0.0 ruser= rhost=  user=alan
Oct  5 11:28:45 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  5 11:36:22 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  5 11:49:20 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  5 11:36:22 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  5 11:49:20 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  5 11:52:48 alan-desktop sshd[32666]: Accepted password for alan from 192.168.1.2 port 49800 ssh2
Oct  5 11:52:48 alan-desktop sshd[32666]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  5 11:57:24 alan-desktop sshd[32758]: Accepted password for alan from 192.168.1.2 port 49815 ssh2
Oct  5 11:57:24 alan-desktop sshd[32758]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  5 11:58:07 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  5 11:58:13 alan-desktop sshd[387]: Invalid user Alan from 192.168.1.4
Oct  5 11:58:13 alan-desktop sshd[387]: Failed none for invalid user Alan from 192.168.1.4 port 37523 ssh2
Oct  5 11:58:16 alan-desktop sshd[387]: pam_unix(sshd:auth): check pass; user unknown
Oct  5 11:58:16 alan-desktop sshd[387]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=alan-desktop.local
Oct  5 11:58:18 alan-desktop sshd[387]: Failed password for invalid user Alan from 192.168.1.4 port 37523 ssh2
Oct  5 11:59:29 alan-desktop sshd[387]: pam_unix(sshd:auth): check pass; user unknown
Oct  5 11:59:31 alan-desktop sshd[387]: Failed password for invalid user Alan from 192.168.1.4 port 37523 ssh2
Oct  5 11:59:37 alan-desktop sshd[387]: pam_unix(sshd:auth): check pass; user unknown
Oct  5 11:59:39 alan-desktop sshd[387]: Failed password for invalid user Alan from 192.168.1.4 port 37523 ssh2
Oct  5 11:59:39 alan-desktop sshd[387]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=alan-desktop.local
Oct  5 12:17:01 alan-desktop CRON[394]: pam_unix(cron:session): session opened for user root by (uid=0)
Oct  5 12:17:01 alan-desktop CRON[394]: pam_unix(cron:session): session closed for user root
Oct  5 12:19:56 alan-desktop sshd[358]: Received disconnect from 192.168.1.2: 11: disconnected by user
Oct  5 12:19:56 alan-desktop sshd[32758]: pam_unix(sshd:session): session closed for user alan
Oct  5 12:54:40 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
Oct  5 12:58:55 alan-desktop sshd[414]: Accepted password for alan from 192.168.1.2 port 50063 ssh2
Oct  5 12:58:55 alan-desktop sshd[414]: pam_unix(sshd:session): session opened for user alan by (uid=0)
Oct  5 13:10:27 alan-desktop gnome-screensaver-dialog: gkr-pam: unlocked login keyring
 
  


Reply

Tags
ssh public key, ubuntu, windows7



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SSH and clear text passwords mattydee Slackware 12 08-22-2012 10:01 AM
ssh wont accept passwords investmentbnker75 Linux - Server 17 11-01-2008 12:03 PM
see wrong ssh passwords jomen Linux - Newbie 5 07-07-2008 06:03 AM
SSH and passwords Hazzie Linux - Security 3 11-18-2004 10:53 AM
ssh question about passwords shanenin Linux - Networking 0 09-13-2004 01:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration