LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-24-2004, 05:10 AM   #16
markehb
LQ Newbie
 
Registered: Mar 2004
Distribution: mandrake 9.0
Posts: 29

Original Poster
Rep: Reputation: 15

cheers, but no joy.
 
Old 03-24-2004, 08:12 AM   #17
mako747
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware
Posts: 92

Rep: Reputation: 15
Hi.

On the machine that you want to log into without a password you should have the public key that was generated by running ssh-keygen on the machine that you want to connect from.
The private key stays on the machine that you are connecting from.
The ~/mark/.ssh directory should have 700 permissions, owner mark, group users
The id_dsa.pub should be called just that, the id_dsa private key has to know what to look for.

Cat the key (id_dsa.pub) to an empty authorized_keys file

Here is my sshd_config



# $OpenBSD: sshd_config,v 1.65 2003/08/28 12:54:34 markus Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

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

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

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

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

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCreds yes

# Set this to 'yes' to enable PAM authentication (via challenge-response)
# and session processing. Depending on your PAM configuration, this may
# bypass the setting of 'PasswordAuthentication'
#UsePAM yes

#AllowTcpForwarding yes
#GatewayPorts no#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server

Good luck, take it step by step and it will work.

#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
 
Old 03-24-2004, 08:30 AM   #18
markehb
LQ Newbie
 
Registered: Mar 2004
Distribution: mandrake 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
done it! 4 days of frustration and surfing the net overwith.

Thanks Mako your a star, thanks everyone who helped

w00t!

 
Old 03-24-2004, 08:58 AM   #19
mako747
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware
Posts: 92

Rep: Reputation: 15
Congratulations !

Have fun.
 
Old 03-24-2004, 11:40 AM   #20
markehb
LQ Newbie
 
Registered: Mar 2004
Distribution: mandrake 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
spoke to soon, tried to rsync using ssh works fine without prompt, then tried doing it in a cron job and gets permission denied.

So I removed .shost (which I think it doesn't need to do it this way) and just gets the password prompt again.
 
Old 03-24-2004, 12:03 PM   #21
mako747
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware
Posts: 92

Rep: Reputation: 15
The cron job...are you using scp?

If so, plug in the full path.

And, do you mean that you can now no longer connect via ssh without a password prompt?
 
Old 03-25-2004, 02:42 AM   #22
markehb
LQ Newbie
 
Registered: Mar 2004
Distribution: mandrake 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
not using scp doing:

rsync -ave ssh mark@111.111.111.111/var/www/html/ /var/www/html/

and yes after removing .shosts it now prompts for a password again.
 
Old 03-25-2004, 09:58 AM   #23
mako747
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware
Posts: 92

Rep: Reputation: 15
Ok, I just tested it and it works.

used the command....
rsync -av --rsh="ssh -i .ssh/id_rsa" brad@10.10.1.234:/home/brad/ /home/brad/

Here is the output....

brad@brad:~$ rsync -av --rsh="ssh -i .ssh/id_rsa" brad@10.10.1.234:/home/brad/ /home/brad/
Warning: Identity file .ssh/id_rsa does not exist.
receiving file list ... done
wrote 16 bytes read 274 bytes 580.00 bytes/sec
total size is 5734 speedup is 19.77
brad@brad:~$

Did you make any directory permission changes or anything like that?
 
Old 03-25-2004, 10:02 AM   #24
markehb
LQ Newbie
 
Registered: Mar 2004
Distribution: mandrake 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
you haven't got .shosts have you? i'll try forcing it to use the key, though on yours it didn't find it?

permissions are 755 on the .ssh dir on the host 600 on authorized_keys.
and 600 on the private key file on the remote.
 
Old 03-25-2004, 10:10 AM   #25
mako747
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware
Posts: 92

Rep: Reputation: 15
It whined but did what it was supposed to.

Check this out...

http://lists.samba.org/archive/rsync...er/007404.html
 
Old 03-25-2004, 10:12 AM   #26
mako747
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware
Posts: 92

Rep: Reputation: 15
Grrr......

That should be /rsync/2003-October/ in the middle of that url....
 
Old 03-25-2004, 10:15 AM   #27
markehb
LQ Newbie
 
Registered: Mar 2004
Distribution: mandrake 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
s'ok, the link worked fine , the board just truncated the middle to make it shorter. reading it now
 
Old 03-25-2004, 11:12 AM   #28
markehb
LQ Newbie
 
Registered: Mar 2004
Distribution: mandrake 9.0
Posts: 29

Original Poster
Rep: Reputation: 15
nope, still not working, gonna ping it out the window in a min
 
  


Reply



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
Does not prompt for password ssharma_02 Linux - Security 6 06-02-2005 01:51 AM
ssh no password prompt dtra Linux - Software 9 05-25-2005 01:08 PM
ssh password prompt delay long while chaze Linux - Networking 1 04-14-2005 10:03 PM
password prompt ? wr3ck3d Linux - General 5 03-20-2003 08:54 PM
remote command over ssh, password prompt linowes Linux - General 2 10-27-2002 08:22 PM

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

All times are GMT -5. The time now is 01:27 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