RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 797174 - sftp command does not have '-i' option
Summary: sftp command does not have '-i' option
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openssh
Version: 6.2
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Petr Lautrbach
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 795804 807884 815596
TreeView+ depends on / blocked
 
Reported: 2012-02-24 13:00 UTC by Cong Wang
Modified: 2013-09-30 02:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-28 05:56:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Cong Wang 2012-02-24 13:00:20 UTC
Description of problem:
The 'sftp' on RHEL6 doesn't have "[-i identity_file]"
option:

[root@sgi-xe250-02 ~]# sftp
usage: sftp [-1Cv] [-B buffer_size] [-b batchfile] [-F ssh_config]
            [-o ssh_option] [-P sftp_server_path] [-R num_requests]
            [-S program] [-s subsystem | sftp_server] host
       sftp [user@]host[:file ...]
       sftp [user@]host[:dir[/]]
       sftp -b batchfile [user@]host


Version-Release number of selected component (if applicable):

[root@sgi-xe250-02 ~]# rpm -q --whatprovides /usr/bin/sftp
openssh-clients-5.3p1-70.el6_2.2.x86_64


How reproducible:
Always

Additional info:
[-i identity_file] is needed by kdump to provide password-less access via sftp.

Comment 2 Petr Lautrbach 2012-02-27 21:33:59 UTC
Either ssh-agent or 'ssh -o' can be used:

$ ssh-copy-id -i .ssh/account_rsa localhost
account@localhost's password: 
Now try logging into the machine, with "ssh 'localhost'", and check in:

  ~/.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

$ ssh-add ~/.ssh/account_rsa
Enter passphrase for /home/account/.ssh/account_rsa: 
Identity added: /home/account/.ssh/account_rsa (/home/account/.ssh/account_rsa)

$ sftp localhost
Connected to localhost.
sftp> 

$ ssh-add -D
All identities removed.

-----------------

$ sftp -o 'IdentityFile ~/.ssh/account_rsa' localhost
Enter passphrase for key '/home/account/.ssh/account_rsa': 
Connected to localhost.
sftp>

Comment 3 Cong Wang 2012-02-28 05:56:01 UTC
Hi, Petr,

-o 'IdentityFile ~/.ssh/account_rsa' works fine for me, thanks for your help!

I am closing this bug as WORKSFORME.


Note You need to log in before you can comment on or make changes to this bug.