The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
password verification verify password of a user for only first 8 characters amitpansuria UNIX for Advanced & Expert Users 12 10-23-2008 10:03 AM
Script doesn't work, but commands inside work cheongww UNIX for Dummies Questions & Answers 2 11-14-2006 10:52 PM
Change password by pushing encrypted password to systems benq70 UNIX for Dummies Questions & Answers 1 09-02-2005 09:08 AM
awk may work! moxxx68 UNIX for Dummies Questions & Answers 0 09-07-2004 03:22 AM
why won't this Work? mbabeli UNIX for Dummies Questions & Answers 6 12-08-2003 08:17 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-26-2008
bradtri1 bradtri1 is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 2
Can't get SSH to work without password

Need some help on this!! I've been trying to get SSH to work without having to enter a password. I've found numerous articles on this and have tried the instructions, but am still getting prompted for a password. One thing to mention is that I'm using different IDs on the two servers.

Here's what I've done so far:

ssh-keygen -t rsa -f id_rsa (to gen the keys)

cat id_rsa.pub|ssh dsadm@dw005 'cat >> .ssh/authorized_keys' (to copy public key to target server)

ssh dw005 -n -l dsadm /export/home/dsadm/test_ssh (this will prompt for password)

Below is the debugging info when using "-v"

dev-edw:/home/instgd/.ssh# ssh dw005 -v -n -l dsadm /export/home/dsadm/test_ssh
OpenSSH_4.1p1, OpenSSL 0.9.7d 17 Mar 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Failed dlopen: /usr/krb5/lib/libkrb5.a(libkrb5.a.so): 0509-022 Cannot load module /usr/krb5/lib/libkrb5.a(libkrb5.a.so).
0509-026 System error: A file or directory in the path name does not exist.

debug1: Error loading Kerberos, disabling Kerberos auth.
debug1: Connecting to dw005 [172.29.30.12] port 22.
debug1: Connection established.
debug1: identity file /home/instgd/.ssh/identity type -1
debug1: identity file /home/instgd/.ssh/id_rsa type 1
debug1: identity file /home/instgd/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'dw005' is known and matches the RSA host key.
debug1: Found key in /home/instgd/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/instgd/.ssh/identity
debug1: Offering public key: /home/instgd/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /home/instgd/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
dsadm@dw005's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: /export/home/dsadm/test_ssh
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.2 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0
  #2 (permalink)  
Old 11-26-2008
Ikon's Avatar
Ikon Ikon is offline Forum Advisor  
Registered User
  
 

Join Date: Jul 2008
Location: Phoenix, Arizona
Posts: 669
Code:
1. Suppose the domain name of your server is server, and your login name loginname. 

2. On the client, generate a public and private key. 
ssh-keygen -C loginname@server -t dsa

When asked for a password, simply press return. 

The private key is stored in ~/.ssh/id_dsa, and the public key in ~/.ssh/id_dsa.pub. 

Never give the private key away!

3. Copy the public file to the server with 
scp ~/.ssh/id_dsa.pub loginname@server:~/

4. Login on the server with 
ssh loginname@server

append the copied file to ~/.ssh/authorized_keys with

cat ~/id_dsa.pub >>~/.ssh/authorized_keys

5. If you want to enable this features on other servers, just repeat step 3 on each of the servers. 

That’s it! If you have done everything correctly, the next time you login via SSH or use CVS over SSH, 
you will not need to enter a password yet you have a secure connenction.
  #3 (permalink)  
Old 11-26-2008
bradtri1 bradtri1 is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 2
ikon - thanks for the info, but that's what I already did ...

any thoughts on whether going from one id to another is causing a problem??

i.e. using the "-l username" option on the ssh command
Closed Thread

Bookmarks

Tags
ssh automatic login

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:28 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0