Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Public and Private Key generation for scp Post 302811857 by Astrocloud on Friday 24th of May 2013 10:52:22 AM
Old 05-24-2013
Quote:
Originally Posted by Scott
Code:
ssh-keygen

Copy the contents of id_rsa.pub into the ~/.ssh/authorized_keys file on the server you want to connect to.
I'll try this.

Quote:
Originally Posted by Corona688
The procedure for generating keys for scp is the same as for generating keys for ssh.

At it's simplest, if your system has ssh-copy-id, you can just ssh-keygen, then ssh-copy-id username@host.

What do you mean, "references them from scp" ?

Generally, if a question is misinformed -it's because the questioner doesn't understand something. So to answer your question: exactly as it sounds. How does SCP use keys to connect to a foreign server? How do I use them (keys) within the context of moving files between servers (automatically).
 

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Public/Private Key SSH from UNIX to Windows (Cygwin)

Hello all, I have a bit of trouble working a passwordless SSH from UNIX to Cygwin running windows 2k3. Here are some details. I AM able to SSH from the Windows box to the UNIX box using the keys. Also, I'm able to SSH from UNIX to Windows w/o the keys. However, when I try to do it with the keys... (9 Replies)
Discussion started by: kclerks11
9 Replies

2. UNIX for Dummies Questions & Answers

SSL Public key/Private question

Hi everyone, I have a quick/newb question: I know that a public key is used to encrypt data and a private key is used to decrypt data but who keeps the public/private keys?? Does the Web Server hold both? Does the Web Server have the public key and does the client have the private key? ... (3 Replies)
Discussion started by: tical00
3 Replies

3. Shell Programming and Scripting

SFTP in a shell script without public/private key

Hi everybody, I need some help on writing a script that is able to remote copy file to one server. I already created this types of scripts, and works ok as long as this server I want to copy from is access through telnet. Here is how I do it: ftp -n xxx.xxx.xxx.xxx << _EOF_ user user_name... (6 Replies)
Discussion started by: Alexis Duarte
6 Replies

4. Shell Programming and Scripting

how to ssh to remote unix machines using private/public key

hello, iam able to ssh to a linux server from a linux server called "machine1" using the private/public key method, so I dont need to enter any password when I run my script but iam not able to ssh from machine1 to a UNIX server, access is denied. note that I am using an application id which is... (6 Replies)
Discussion started by: wydadi
6 Replies

5. UNIX for Dummies Questions & Answers

how to create a public/private key using ssh-keygen

Hi, please guide me create a public/private key using ssh-keygen, lets say I have been access to server named pngpcdb1with a userid and password ...!!! and also please explain in detail the concept of these keys and ssh as I was planning to use them in ftp related scripts..! Thanks in... (1 Reply)
Discussion started by: rahul125
1 Replies

6. Solaris

Public private key setup issue in Solaris 10

Hi i am using solaris 10.I am trying to setup a public/private key but it is not working.Appreciate your repsonse on it There are two servers DB1 server and DB2 server. 1)I have generated public/private key using below step on both servers. ssh-keygen -t rsa 2)From DB1 server moved the... (6 Replies)
Discussion started by: muraliinfy04
6 Replies

7. UNIX for Advanced & Expert Users

scp without first time key generation and confirmation

Hi All, I have setup ssh keys for a user to transfer files without password between two hosts. But still the first time scp asks for confirmation and generates a key Due to this our jobs are failing. Is there a way I can avoid that first time key generation and confirmation also and automate... (3 Replies)
Discussion started by: baanprog
3 Replies

8. Shell Programming and Scripting

Rsa public private key matching

Hi All, I have a requirement where i need to check if an rsa public key corresponds to a private key and hence return success or failure. Currently i am using the command diff <( ssh-keygen -y -e -f "$PRIVKEY" ) <( ssh-keygen -y -e -f "$PUBLICKEY" ) and its solving my purpose. This is in... (1 Reply)
Discussion started by: mritusmoi
1 Replies

9. UNIX for Advanced & Expert Users

Private and public key encryption

Hi, we have private and public key, encrypt file using public and want to decrypt using private key. can you please advise below commands are correct or other remedy if unix have? encrypt -a arcfour -k publickey.asc -i TESTFILE.csv -o TESTFILE00.csv decrypt -a arcfour -k privatekey.asc... (2 Replies)
Discussion started by: rizwan.shaukat
2 Replies

10. UNIX for Advanced & Expert Users

Ssh public/private key user login problem

I have a user account configuration with ssh public/private key that works on multiple servers centos and rhel. One server (Server F) that is not working in centos 6.8. When i ssh into server f I get prompted for a password. I have verified the config and it all is good. I put sshd into debug... (8 Replies)
Discussion started by: bash_in_my_head
8 Replies
dnssec-keygen(1)					      General Commands Manual						  dnssec-keygen(1)

NAME
dnssec-keygen - key generation tool for DNSSEC SYNOPSIS
algorithm] keysize] class] flag] generator] nametype] protocol-value] randomdev] strength-value] type] level] name DESCRIPTION
generates keys for Secure DNS (DNSSEC) as defined in RFC 2535. It also generates keys for use in Transaction Signatures (TSIG), which are defined in RFC 2845. Options recognizes the following options: Specify the encryption algorithm. The algorithm can be (RSA), or algorithm is case-insensitive. DNSSEC specifies as a mandatory algorithm and as a recommended one. Implementations of TSIG must support Determine the number of bits in the key. The choice of key size depends on the algorithm that is used. For the or algorithm, keysize must be between 512 and 2048 bits. For the (Diffie-Hellman) algorithm, keysize must be between 128 and 4096 bits. For the (Digital Signature) algorithm, keysize must be between 512 and 1024 bits and a multiple of 64. For the algorithm, keysize must be between 1 and 512 bits. Set the class for the DNS record containing the key. The default class is (Internet). Other values for class are (Chaosnet) and (Hesiod). Generate and keys with a large exponent value. Set the specified flag in the flag field of the KEY or DNSKEY record. The only recognized flag is (Key Signing Key) for DNSKEY. Select the generator to be used when creating Diffie-Hellman keys. The only supported values for generator are and If no Diffie-Hellman generator is supplied, a known prime from RFC 2539 is used, if possible; otherwise, is used as the generator. Print a summary of the options and operands. Generate KEY records rather than DNSKEY records. Specify how the generated key will be used. nametype can be either or to indicate that the key will be used for signing a zone, host, entity, or user, respectively. In this context, and are equivalent. nametype is case-insensitive. Set the protocol value for the generated key to protocol-value. The default is (DNSSEC). Other possible values for this argument are listed in RFC 2535 and its successors. Override the behavior of to use random numbers to seed the process of generating keys when the system does not have a device to generate random numbers. The program prompts for keyboard input and uses the time intervals between keystrokes to provide randomness. With this option, it uses randomdev as a source of random data. Set the key's strength value. The generated key will sign DNS resource records with a strength value of strength-value. It should be a number in the range The default strength is The key strength field currently has no defined purpose in DNSSEC. Indicate if the key is used for authentication or confidentiality. type can be one of The key can be used for authentication and confidentiality. The key cannot be used for authentication or confidentiality. The key can be used for confidentiality but not for authentication. The key cannot be used for confidentiality, although it can be used for authentication. The default is Set the verbosity level. As the debugging/tracing level increases, generates increasingly detailed reports about what it is doing. The default level is 0. Operands name The domain name for which the key is to be generated. Generated Keys When completes, it prints an identification string on standard output for the key it has generated, in the form The fields are: nnnn The dot-terminated domain name given by name. aaa The DNSSEC algorithm identifier. iiiii A five-digit number identifying the key. creates two files. The file names are adapted from the key identification string above, in the form: These contain the public and private parts of the key respectively. The files generated by follow this naming convention to make it easy for the signing tool to identify which files have to be read to find the necessary keys for generating or validating signatures. The file contains a resource record that can be inserted into a zone file with a statement. The private part of the key is in the file. It contains details of the encryption algorithm that was used and any relevant parameters. For obvious security reasons, the file does not have general read permission. Both and key files are generated by a symmetric encryption algorithm, such as even though the public and private key are equivalent. EXAMPLES
To generate a 768-bit DSA key for the domain issue the command: prints the key identification string indicating a DSA key with identifier 26160. It creates the files which contain the public and private keys, respectively, for the generated DSA key. AUTHOR
was developed by the Internet Systems Consortium (ISC). FILES
SEE ALSO
dnssec-signzone(1). Requests for Comments (RFC): 2535, 2539, and 2845, available online at available online at available from the Internet Systems Consortium at BIND 9.3 dnssec-keygen(1)
All times are GMT -4. The time now is 07:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy