Sponsored Content
Full Discussion: SFTP / SCP using password
Top Forums Shell Programming and Scripting SFTP / SCP using password Post 302691453 by hergp on Friday 24th of August 2012 02:40:24 PM
Old 08-24-2012
sftp works with key based login too. Just upload your public key to ~/.ssh/authorized_keys and make sure, the access mode of the .ssh directory is correct (700).
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

OpenSSH: SFTP X SCP

Hi all, I'm implementing some updates to my scripts that are now using ftp command. I was thinking about replace it by SFTP. Now I see that SCP does basically the same that SFTP. So... what are the differences between them? Thanks in advance... ;O) (1 Reply)
Discussion started by: alienET
1 Replies

2. UNIX for Dummies Questions & Answers

sftp/scp autologin

Ive have 2 unix machines i need to transfer files from one to the other. Im trying to use either sftp or scp as ftp is out of the question. Ive created the RSA key on one machine and copied it across but im still prompted for a password. Assume this is due to the fact that im not using the same ID... (8 Replies)
Discussion started by: devid
8 Replies

3. UNIX for Advanced & Expert Users

sftp vs scp

My transmit rates are waaay faster using scp over sftp....anyone know why scp is faster than sftp? I am using solaris 8 for my unix systems. -S (2 Replies)
Discussion started by: Sowser
2 Replies

4. 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

5. Red Hat

sftp/scp without password

Hi, I want to use sftp/scp without password.How can I do that ?? I plan to use script with scp/sftp and execute by cronjob ,any sample or example?? How can I test the scp/sftp working or not in the same user account , in the same red linux server?? any suggestion ??? (5 Replies)
Discussion started by: chuikingman
5 Replies

6. Shell Programming and Scripting

scp script for doing sftp

Hi, I have to do SFTP from Linux machine to Salaries SFTP folder. Using psftp I got the following fingur print and I know using scp I can go the sftp transfer. But I believe I need public key file generated. Can some one pls let me know how to generate the public file using following finger... (1 Reply)
Discussion started by: iamakshay
1 Replies

7. AIX

what to use sftp or scp

hi, i have a weird problem i have to copy the file with caret(^) in it. but when i tries to copy with scp. It(scp) says that it cant use ^file_name scp mohit^narang user@machine/mohit^narang the error comes in the second parameter.if i used user@machine/mohit_narang(under score) instead... (2 Replies)
Discussion started by: narang.mohit
2 Replies

8. Shell Programming and Scripting

SFTP and SCP help

Hi All, I have to make an automated script that needs to do SFTP or SCP from my Unix server to another Unix server. I have gone through search of this website for sftp and scp. I really get confused when it talk about ssh key or rsh key and sftp -b thing I would really appreciate if... (4 Replies)
Discussion started by: pinnacle
4 Replies

9. Shell Programming and Scripting

SFTP prompting for password even though password is in script

Hi All, I am trying to transfer a file from one server to a remote server using SFTP. Client is not ready for key setup. I am working on Solaris 10. Here is the code. #!/bin/ksh # sample automatic Sftp script to dump a file USER="user1" PASSWORD="pass1" HOST="host1" sftp $USER@$HOST... (6 Replies)
Discussion started by: megha2525
6 Replies

10. Shell Programming and Scripting

SFTP or scp with password in a batch script without using SSH keys and expect script

Dear All, I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
Discussion started by: ss112233
5 Replies
SSH-KEYCONVER(1)					    BSD General Commands Manual 					  SSH-KEYCONVER(1)

NAME
ssh-keyconvert -- convert ssh v1 keys and authorization files SYNOPSIS
ssh-keyconvert [-k] [-o output_file] identity_file ... ssh-keyconvert [-a] [-o output_file] authorization_file ... DESCRIPTION
ssh-keyconvert converts RSA public and private keys used for public key based user authentication with protocol version 1 to the format used with protocol version 2. When using RSA user authentication with SSH protocol version 1, the client uses the private key from $HOME/.ssh/identity to provide its iden- tity to the server. The server grants or denies access based on whether the public part of this key is listed in $HOME/.ssh/authorized_keys. SSH protocol version 2 supports both DSA and RSA keys, but the way RSA keys are stored are differently. On the client, the default file name is .ssh/id_rsa rather than .ssh/identity, and the file's format is different as well. On the server, the public porting of the key can still be stored in .ssh/authorized_keys, but the key notation has changed as well. Therefore, when switching from protocol version 1 to version 2, you either have to create a new identity key using ssh-keygen(1) and add that key to the server's authorized_keys file, or you need to con- vert your keys using ssh-keyconvert. By default, ssh-keyconvert will try to guess the type of file that is to be converted. If it fails to guess correctly, you can tell if what type of conversion to perform by specifying the -k option to convert the private key, or the -a option to convert an authorisation file. When converting your private keys stored in .ssh/identity, ssh-keyconvert will read the private key, prompting you for the pass phrase if the key is protected by a pass phrase. If the -o option is given, it will write the private key to the specified file, using version 2 syntax. If the key was protected by a pass phrase, it will use the same pass phrase to protect the new file. It will also write the public portion of the key to a second file, using the specified file name with ``.pub'' appended. If the -o option was not given, private and public key will be written to id_rsa and id_rsa.pub, respectively, relative to the directory of the input key file. If the destination file already exists, ssh-keyconvert will prompt the user for confirmation before overwriting the file, unless the -f option is given. When converting your authorized_keys file, ssh-keyconvert will ignore any keys in SSH version 2 format. Any public keys in version 1 format will be converted and appended to the output file using the new syntax. If the -o option is given, keys are appended to the specified file. If it is not given, ssh-keyconvert will append all keys to the input file. Note that ssh-keyconvert does not check for duplicate keys, so if you run it on .ssh/authorized_keys more several times, the converted keys will show up several times. OPTIONS
-k Convert private key file(s). The default is to guess the type of file that should be converted. -a Convert authorized_keys file(s). The default is to guess the type of file that should be converted. -o outfile Specify the name of the output file. When converting an authorization file, all public keys will be appended to this file. For pri- vate key conversion, the private and public components of the key will be stored in outfile and outfile.pub, respectively. Note that since every key must be stored in a separate file, you cannot use this option when you specify several input files. -f When converting a key file, and the output file already exists, ssh-keyconvert will ask the user whether to overwrite the file. Using this option forces overwriting. AUTHORS
OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. ssh-keyconvert was contributed by Olaf Kirch. SEE ALSO
ssh(1), ssh-add(1), ssh-agent(1), sshd(8) J. Galbraith and R. Thayer, SECSH Public Key File Format, draft-ietf-secsh-publickeyfile-01.txt, March 2001, work in progress material. BSD
February 2, 2002 BSD
All times are GMT -4. The time now is 12:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy