Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 19231 - scp to a keychain box isn't working
Summary: scp to a keychain box isn't working
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jon Portnoy (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-13 06:40 UTC by Sascha Schwabbauer (RETIRED)
Modified: 2003-06-09 11:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Schwabbauer (RETIRED) gentoo-dev 2003-04-13 06:40:21 UTC
Hey,
ok let me try to explain the problem,
I use keychain on box #1 to ssh into my gateway (box #2),
so ssh'ing into box #2 works without any problems, but if I'm logged in, via box
#1 and I want to scp something from box #2 to box #1 again, it doesnt work..
i just get 
"cyber@cybersystem cyber $ scp foo.bar 192.168.0.4:/home/cyber
cyber@192.168.0.4's password: 
Agent pid 22490
cyber@cybersystem cyber $"
and it doesnt work.. so that's a lil bit weird,
i start keychain via my .bashrc which looks like
"eval `ssh-agent`

#!/bin/bash
/usr/bin/keychain ~/.ssh/identity ~/.ssh/id_dsa
source ~/.keychain/imac-sh  /dev/null"

ok, i hope you got what i mean, though my english is pretty bad :)
if you need anything else from me, tell me..

btw. seemant told me to assign you this bug,
regards
Comment 1 Seth Chandler 2003-04-22 03:04:10 UTC
aight cyb...let me see if i can reproduce...

i REALLY don't understand your eval ssh-agent stuff...here is what i have

in ~/.bash_profile
keychain ~/.ssh/id_dsa
  . ~/.keychain/${HOSTNAME}-sh

thats it and thats all =)

Comment 2 Sascha Schwabbauer (RETIRED) gentoo-dev 2003-04-22 15:33:19 UTC
hmm, I did that, like drobbins in the docs, well when i try your way i get this when i try to scp something to the box where keychain is installed:
cyber@cybersystem cyber $ scp build.sh 192.168.0.4:/home/cyber
cyber@192.168.0.4's password: 

KeyChain 2.0.3; http://www.gentoo.org/projects/keychain
cyber@cybersystem cyber $ 
--
i know its hard to understand what i mean, but just try it, log in to cvs with keychain and try to scp something from cvs to your box with your keychain..

regards
Comment 3 Seth Chandler 2003-04-22 15:49:35 UTC
ahah! thats not what keychain is good for... 
 
you have to use keyforwarding to get the desired effect there =) 
 
keychain would have to be running on BOTH boxes... 
  
check this out.. 
box a = running keychian 
box b = not running keychain but allows access from box a 
 
box a scp to box b, will not ask for password 
 
box b scp to box a, will ask for password 
 
box a ssh to box b, while on box b try to scp to box a...will ask for password... 
 
you have to forward your keys...(there is some command line switch on ssh that does it...) 
 
 
seth 
Comment 4 Jon Portnoy (RETIRED) gentoo-dev 2003-04-30 17:46:10 UTC
Is keychain running from .bashrc? If so, that breaks scp.

From the comments at the top of the skel .bashrc:

# This file is sourced by all *interactive* bash shells on startup.  This
# file *should generate no output* or it will break the scp and rcp commands.

Comment 5 Christian Gut 2003-06-09 11:11:24 UTC
as Jon says, keychain should only be executed on interactive shells. read the manpage of your shell for this. i think this bug should be closed since it isnt really one. Just a little user-mistake (i had something similar too, some time ago)
Comment 6 Jon Portnoy (RETIRED) gentoo-dev 2003-06-09 11:20:19 UTC
Closing.