LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-14-2011, 12:10 AM   #1
GreatAlfredini
LQ Newbie
 
Registered: May 2011
Posts: 2

Rep: Reputation: 0
Question scp works with identical box A, fails with box B


Hi everyone, Linux newbie using red hat.

I am user1@machine1, and have written a tiny sh script to scp a file without being prompted for a password.

I run the script on machine1, it uploads a file to the homedir of userA@machineA. I cat'ed user1's public key into copied it to machineA/usr/userA/.ssh/authorized_keys. It works like a dream. The file gets uploaded automatically without a password.

However when I try the exact same thing on machineB it fails, meaning that it requests a password, so I can't automate the uploading process.

I have spent about 8 hours double-checking that everything is the same on machines A and B; the permissions, the file locations, the directory names, everything. Machine1 can scp to A, but not to B.

I tried running the script with the -vvv parameter, and studied the results very closely, side by side on a spreadsheet.

Everything seems practically the same (except for ip addresses and such) until line 140, which on server A says :
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug3: Wrote 368 bytes for a total of 1477
debug1: Server accepts key: pkalg ssh-rsa blen 277

but in server B says:
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug3: Wrote 368 bytes for a total of 1477
debug1: Authentications that can continue: publickey,gssapi-with-mic,keyboard-interactive

So B says "authentications that can continue" instead of A's "server accepts key". B then continues :

debug1: Trying private key: /home/transfer/.ssh/id_dsa
debug3: no such identity: /home/transfer/.ssh/id_dsa
debug2: we did not send a packet, disable method

at which point serverB decides to ask for a keyboard-interactive password.

I compared the ssh_config and sshd_config files on all three machines. They were virtually identical, except for minor things like leading spaces on some lines.

There's only one difference, in both target machines (A and B) the ssh -ver command gives OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

However, in the source machine (machine1) the same command gives OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010. I'm not sure this means much, because it's the same source machine, albeit with a different version, trying to scp into two identically-configured machines. If it works on one, why not the other?

Am going nuts, would be deeply grateful for any tips.
 
Old 05-14-2011, 03:48 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
Greetingz!

SSH sure does suck sometimes, doesn't it?

Try this;
Code:
echo "ForwardAgent no" >> ~/.ssh/test
ssh -F ~/.ssh/test servername
 
Old 05-26-2011, 10:12 AM   #3
GreatAlfredini
LQ Newbie
 
Registered: May 2011
Posts: 2

Original Poster
Rep: Reputation: 0
It turned out that I didn't have the proper chmod rights to place files in the target directory. When the admin gave me those rights, the script worked.
 
  


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
[SOLVED] Can't telnet/ssh/sftp/scp to my ubuntu box rhimbo Ubuntu 1 11-07-2007 07:09 PM
PC fails to boot - a new box satimis Linux - Hardware 11 03-25-2007 11:07 PM
scp file from a linux box to a windows box? cucolin@ Linux - General 1 03-25-2007 10:07 PM
Very Strange MySQL Problem...works fine on small box, terrible on big box DukeLeto Linux - Software 2 01-01-2007 08:14 AM
Using cronjobs to mysql dump and scp backup to another box daiver Linux - General 4 11-10-2006 07:37 AM

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

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