Bug 1072992

Summary: scp does not pass the -F option to second connection
Product: Red Hat Enterprise Linux 7 Reporter: Hubert Kario <hkario>
Component: opensshAssignee: Petr Lautrbach <plautrba>
Status: CLOSED NOTABUG QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-14 14:50:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 985650    
Bug Blocks:    

Description Hubert Kario 2014-03-05 15:15:22 UTC
Description of problem:
When using custom config file, scp -F option is not passed to second ssh process.

Version-Release number of selected component (if applicable):
openssh-6.4p1-5.el7

How reproducible:
Always

Steps to Reproduce:

cat > ~/.ssh/custom_config << __EOF__
Host host1
   HostName localhost

Host host2
   HostName localhost
__EOF__
touch file
scp -F ~/.ssh/custom_config host1:file host2:/tmp/

Actual results:
Unknown host name "host2"

Expected results:
File copied to /tmp folder

Additional info:

Comment 1 Petr Lautrbach 2014-07-14 14:50:39 UTC
This is expected. openssh runs 'ssh <host> scp ...' when a file is not available locally. If you need to use local config file and use it for both connection, use -3 option then.