SFTP command with certificate authentication


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat SFTP command with certificate authentication
Prev   Next
# 1  
Old 08-16-2011
CPU & Memory SFTP command with certificate authentication

Hello list,

I am attempting to connect from a Redhat 6 machine to another linux machine. When I use the SSH command and specify my private key to use this it all connects fine, however there doesn't seem to be an option in the SFTP command to specify my private key for authentication.

In cygwin for windows I can just use the -i switch as follows:

sftp -i c:\cygwin\home\sshkeys\private_key user@sftpserver

However the -i switch doesn't seem to exist in Redhat/CentOS 6.

Can anyone shed some light on how I can get the same functionality to work from Redhat?

thanks
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Does vsftpd support user access with client certificate with priv/pub key + vsftpd certificate?

:rolleyes:I am trying to setup all certificate based client-server environment in Linux using vsftpd and curl with openssl. I would like to make a user access with vsftpd certificate and user own client certificate (self-signed) with private/public key. I don't see google posts about the my plan... (4 Replies)
Discussion started by: gogogo
4 Replies

2. UNIX for Dummies Questions & Answers

Pearl script Net::SFTP authentication error

#!/usr/local/bin/perl -w use Net::SFTP; use File::Copy; my $user=(getpwuid($<)); my $server = "servername"; print "user - $user server - $server \n"; my %args = ( user => "$user", ssh_args => {port=> 'portnum'} ); $args{debug} = 1; $args{user} = "user"; my $sftp=Net::SFTP->new($server,... (1 Reply)
Discussion started by: Yashaswini H L
1 Replies

3. UNIX for Advanced & Expert Users

Curl Command to download remote certificate

Hi, I have Apache running with the certificates installed. I need a "unix curl" command to download and display remote server certificate. Kindly help. Note: Apache has ""SSLVerifyClient require" set in its configuration. (3 Replies)
Discussion started by: mohtashims
3 Replies

4. Shell Programming and Scripting

SFTP-how to log individual sftp command error while executing shell script

Hi, I have situation where i need to automate transferring 10000+ files using sftp. while read line do if ; then echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt fi done< files.txt sftp -b sftpCommand.txt stu@192.168.2.1 The above... (1 Reply)
Discussion started by: noobrobot
1 Replies

5. Solaris

bypass password authentication for sftp in unix

I am using solaris unix 8.2 version. I want to bypass password authentication for sftp. Can you please give some ideas on this. thanks.Regards. (4 Replies)
Discussion started by: vijill
4 Replies

6. Shell Programming and Scripting

passwordless authentication of SFTP script

Dear All I need to discuss about the problem which has been discussed so many times here. I need to transfer a file from server A to server B via passwordless SFTP script. By reading the threads on this topic here, I followed the below steps but still it's not working .. Pls find the steps... (13 Replies)
Discussion started by: uday.shankar
13 Replies

7. UNIX for Advanced & Expert Users

Sftp Key Authentication Issue

Hello, We have an issue attempting to login from a Unix Solaris to an NT server using key authentication. I will attempt to provide you with as much of the relevant information regarding the way the system is set up, although I'm workingin solely on the Unix side, so don't have full access to... (3 Replies)
Discussion started by: SteveBurch
3 Replies

8. HP-UX

sftp/scp/ssh script with password as authentication

Hello, Do you guys know set of commands that can incorporate to sftp/scp/ssh to add password in a script to automate file transfer. Our client is not using ssh keys authentication so we are force to create a script to pass the password into the script to transfer files via sftp/scp/ssh. We... (4 Replies)
Discussion started by: james_falco
4 Replies

9. Shell Programming and Scripting

SFTP- Non-interactive user authentication

Hi All, sftp -b script.txt <hostname> user-authentication through non-interactive way is desired. But, its failing to do so. Could anyone kindly advise. Thanks for any/all help at the earliest. Regards, Dheeraj. (1 Reply)
Discussion started by: dheeruchakri
1 Replies
Login or Register to Ask a Question
NBSVTOOL(1)						    BSD General Commands Manual 					       NBSVTOOL(1)

NAME
nbsvtool -- create and verify detached signatures of files SYNOPSIS
nbsvtool [-v] [-a anchor-certificates] [-c certificate-chain] [-f certificate-file] [-k private-key-file] [-u required-key-usage] command args ... DESCRIPTION
nbsvtool is used to create and verify detached X509 signatures of files. Private keys and certificates are expected to be PEM encoded, sig- natures are in PEM/SMIME format. Supported commands: sign file Sign file, placing the signature in file.sp7. The options -f and -k are required for this command. verify file [signature] Verify signature for file. If signature is not specified, file.sp7 is used. verify-code file [signature] This is a short cut for verify with the option -u code. Supported options: -a anchor-certificates A file containing one or more (concatenated) keys that are considered trusted. -c certificate-chain A file containing additional certificates that will be added to the signature when creating one. They will be used to fill missing links in the trust chain when verifying the signature. -f certificate-file A file containing the certificate to use for signing. The certificate must match the key given by -k. -k private-key-file A file containing the private key to use for signing. -u required-key-usage Verify that the extended key-usage attribute in the signing certificate matches required-key-usage. Otherwise, the signature is rejected. key usage can be one of: ``ssl-server'', ``ssl-client'', ``code'', or ``smime''. -v Print verbose information about the signing certificate. EXIT STATUS
The nbsvtool utility exits 0 on success, and >0 if an error occurs. EXAMPLES
Create signature file hello.sp7 for file hello. The private key is found in file key, the matching certificate is in cert, additional cer- tificates from cert-chain are included in the created signature. nbsvtool -k key -f cert -c cert-chain sign hello hello.sp7 Verify that the signature hello.sp7 is valid for file hello and that the signing certificate allows code signing. Certificates in anchor-file are considered trusted, and there must be a certificate chain from one of those certificates to the signing certificate. nbsvtool -a anchor-file verify-code hello hello.sp7 SEE ALSO
openssl_smime(1) CAVEATS
As there is currently no default trust anchor, you must explicilty specify one with -a, otherwise no verification can succeed. BSD
March 11, 2009 BSD