Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have SSH working between my PC when it runs Win2k and my Linux server.
I rebooted the client into Mandrake 9.1 to get SSH working so I can use CVS under Linux as well.
I have my ~/.ssh/authorized_keys setup on the server, and this works because I can login to the server and use CVS from Win2k.
I copied my private key (file identity) from my Win2k partition and put it in ~/.ssh/identity on my Mandrake home partition.
When I try to SSH into the server, it works except I have to enter my password, as though I were logging in through telnet etc.... I presume this means that the private/public key combination isn't being used.
Are there any steps that I missed? Is it ok to copy the private key from the Win32 partition and store it in my home directory? The private key begins with some plain text describing the format of the private key (and not the private key data).
debug1: Connection established.
debug1: identity file /home/mike/.ssh/identity type 0
debug1: identity file /home/mike/.ssh/id_rsa type -1
debug1: identity file /home/mike/.ssh/id_dsa type -1
The very last part of the debug output from the ssh login is:
Quote:
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: authentications that can continue: publickey,password
debug1: next auth method to try is publickey
debug1: try privkey: /home/mike/.ssh/id_rsa
debug1: try privkey: /home/mike/.ssh/id_dsa
debug1: next auth method to try is password
I was having the same problem, I did another ssh-keygen, and just left the key name to the default id_rsa and id_rsa.pub and now it just prompts me for the ssh passphrase, not my user password
When I try to SSH into the server, it works except I have to enter my password, as though I were logging in through telnet etc.... I presume this means that the private/public key combination isn't being used.
This is wrong. You still need to enter your password so your encrypted private key can be decrypted ... if you need to enter username AND password though that's a different story.
I also use public key authentification since this is more secure and my /etc/ssh/sshd_config looks like:
Quote:
Port 22
AllowGroups users
AuthorizedKeysFile %h/.ssh/authorized_keys
#Banner /etc/ssh/banner
ChallengeResponseAuthentication no
ClientAliveInterval 15
ClientAliveCountMax 4
DenyGroups root
DenyUsers root
GatewayPorts no
HostbasedAuthentication no
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_rsa_key
IgnoreRhosts yes
IgnoreUserKnownHosts yes
KeepAlive no
KeyRegenerationInterval 900
ListenAddress 192.168.84.82
#LoginGraceTime 15
LoginGraceTime 30
LogLevel INFO
MaxStartups 5:50:100
PAMAuthenticationViaKbdInt no
PasswordAuthentication no
PermitEmptyPasswords no
PermitRootLogin no
PrintLastLog no
PrintMotd no
Protocol 2
PubkeyAuthentication yes
RhostsAuthentication no
RSAAuthentication no
ServerKeyBits 1024
StrictModes yes
Subsystem sftp /usr/lib/sftp-server
SyslogFacility AUTHPRIV
UseLogin no
UsePrivilegeSeparation yes
VerifyReverseMapping yes
X11Forwarding no
So it allows public key authentification only. The key needs to be stored in ~/.ssh/authorized_keys and the file should have 0600 permissions and nothing more.
I use putty to connect to the server. If you need more help just post!
Originally posted by markus1982 This is wrong. You still need to enter your password so your encrypted private key can be decrypted ... if you need to enter username AND password though that's a different story.
You shouldn't need to enter your password. Your passphrase yes but not your password.
If you want a passwordless login then try this:
1) login as USER on the client (where you want to connect from)
2) ssh-keygen -t dsa
(don't suppy a passphrase now - you can do that later once the first bit works)
3) scp /home/USER/.ssh/id_dsa.pub REMOTEHOST:/home/USER/.ssh/authorized_keys2
(you will need to enter your password this one time)
4) ssh REMOTEHOST
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.