LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 09:24 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 522

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 09:25 AM.
 
Old 06-26-2006, 09:52 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,577
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
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, 05:52 AM   #3
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 522

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 10:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration