Sponsored Content
Top Forums UNIX for Advanced & Expert Users scp without prompting for password Post 302524656 by Skrynesaver on Tuesday 24th of May 2011 06:58:00 AM
Old 05-24-2011
Try a different public key method such as DSA, almost the same procedure, rinse and repeat until you have created a key for an agreed protocol

Code:

$ ssh-keygen -t dsa 
(accept the default for all queries)  
$ cat ~/.ssh/id_dsa.pub | ssh $REMOTE_HOST  "mkdir .ssh ; cat >>.ssh/authorized_keys" 
(enter your password)  
$ ssh $REMOTE_HOST echo 
$ssh $REMOTE_HOST
(should bring you over without keyboard interaction)


Last edited by Skrynesaver; 05-24-2011 at 08:31 AM.. Reason: removed accidental space in code.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SSH - Prompting for password

Hi, Can anybody tell me a way to do ssh , without prompting for password from keyboard, Using RSA. The requirement is I need to create the key , using passphrase also..... Is there any way to do it in UNIX ? I am doing it from AIX machine , but remote machine is Linux I tried... (8 Replies)
Discussion started by: shihabvk
8 Replies

2. UNIX for Dummies Questions & Answers

sftp prompting for password

I have the problem with SFTP; BELOW IS the entry from my ssh_config file It's prompting me for password all the time when using SFTP. pLEASE help. (1 Reply)
Discussion started by: dsravan
1 Replies

3. Programming

ssh via java prompting for password

Hi, I have set up my remote server for password-less login via ssh. If I run the command on my server - ssh user@remoteserver "ls -l" I get an output, but when I try to do this via java String sCmd = new String{"/usr/bin/ssh", " user@remoteserver", "\"ls -l\""}; Process p =... (3 Replies)
Discussion started by: nrworld
3 Replies

4. Shell Programming and Scripting

running a script using su - without prompting password

hi guys, is there any way to run a script using su - without prompting a password? ex: su - $APPSUSERNAME/$APPSUSERPASSWORD stop_apps.sh my purpose here is to run a script with current dbuser. thanks in advance. (3 Replies)
Discussion started by: d3xt3r
3 Replies

5. Shell Programming and Scripting

su through normal user prompting for password.

I have two users on linux box, say user1 user2.Both the users are having passwords. Now I would like to run the script from user1 and switch to another user i.e., user2 from the script itself. ** I do have limited access and I am running from the normal user account.Not from the root... (2 Replies)
Discussion started by: giridhar276
2 Replies

6. Shell Programming and Scripting

Prompting for password

Hi, I have SVN installed in my UNIX solaris server. I actually automated the process that downloads code from SVN server to UNIX solaris server in script. When i run the script, its asking for password to download every element. Its really difficult to type password for every element when... (3 Replies)
Discussion started by: gthangav
3 Replies

7. Shell Programming and Scripting

Ssh is prompting for password

Hi, When i am trying to connect to other server using ssh coomand, it is prompting for password. But i want to hardcode it with username so that it should not prompt for password. And i dont want to use "ssh-keygen" method as it is not allowed. Please help me. Regards, Mukta (7 Replies)
Discussion started by: Mukta
7 Replies

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

9. UNIX for Dummies Questions & Answers

SFTP without prompting password

Dear unix experts, i have a requirement as below. i need to use SFTP as FTP. ftp -n -v << ENDFTP open test_ftp.server user ftp_user_name ftp_password quit ENDFTP if i use this in a shell script, it's not asking for password. But i want the similar thing achived using... (5 Replies)
Discussion started by: AraR87
5 Replies

10. Shell Programming and Scripting

Crontab - password prompting

// Red Hat Enterprise Linux Server release 6.7 I wanted to pass the password, but when I execute this cron, it stops at Password: prompt. Please advise on how to fix the error. Thank you for tour help in advance. #!/usr/bin/ksh su - pmserver echo "su - pmserver" cd... (2 Replies)
Discussion started by: Daniel Gate
2 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 09:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy