LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2006, 08:24 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Rep: Reputation: 31
Copying .ssh from one server to another


Hi!
A colleague of mine uses putty from windows to connect to a linux server. He logs in without giving any password. Now a new linux server has been installed. He copied the .ssh directory from the 1st server to the 2nd one. But when he logs in the 2nd server with the same windows workstation as before, he still needs to give his password.
Shouldn't it work by just coping.ssh from one server to the other? Or did I forget something?
Thanks.

Last edited by xpucto; 06-26-2006 at 08:25 AM.
 
Old 06-26-2006, 08:52 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
ssh is "secure" shell so requires security. The most common causes of "still neeeding a password" are it isn't secure for one of the following reason:

The account on the target host has no password. If this is the case set the password.

The target user's home directory or .ssh is world writable. ls -ld ~user will give you the permissions of the user's home. Insure there is no w or x for anyone other than the user himself. ls -ld ~user/.ssh will give you the permissions for his .ssh - that should have no permissions for anyone but the user himself.

Using the same ssh setup on two hosts is possible and desirable in cluster scenarios but I would advise against it in most other scenarios. You should create a unique .ssh directory on the target host user then insert the keys from the source host user into the target host user's ~user/.ssh/authorized_keys file to enable trust between them.

Just remember such trusts are valid for anyone who can be the source host user. If someone hacks your source host they will then have a quick way to hack all your targets that consider the source host trusted. Unless you're running scripts from the source to the target I'd recommend NOT setting up trusts. Typing a password isn't really that hard based on the security benefit it provides.
 
Old 07-03-2006, 04:52 AM   #3
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 524

Original Poster
Rep: Reputation: 31
Thanks for your answer. The problem was that .ssh was world writable. Thanks afgain for your help.
 
  


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
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM
script for copying to a samba server CloudBuilder Programming 3 03-01-2006 06:04 PM
Copying files from the internet to my server? Fasn8n Linux - General 8 02-13-2006 01:53 PM
server (Fedora core 3) crashing after copying data... zepplin611 Linux - Hardware 1 01-21-2005 10:32 PM
Copying in ssh albean Linux - Newbie 2 12-28-2004 05:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:34 AM.

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