scp without first time key generation and confirmation

Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users scp without first time key generation and confirmation
# 1  
Old 12-11-2013
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 it

# 2  
Old 12-11-2013
If you are referring to confirmation for adding host key to the host key database file, then use option: StrictHostKeyChecking to avoid user confirmation prompt:
scp -o StrictHostKeyChecking=no localfile user@host:remotefile

# 3  
Old 12-11-2013
Only First time?

this it does onyl first time is it? Later on it is a permanent change and it does not ask for confirmation?
# 4  
Old 12-11-2013
Originally Posted by baanprog
this it does onyl first time is it? Later on it is a permanent change and it does not ask for confirmation?
You can use this option even if the host key is added. If the host key is not added, this option will help avoid the first time confirmation prompt.

So the answer to your question is: yes, the key will be updated in the file and it will not ask for confirmation anymore.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Public and Private Key generation for scp

Hi, What tool is used to generate public and private keys for SCP? Do you have an example script that generates these keys, puts them in files and then another example script that references them from SCP? Thanks, (9 Replies)
Discussion started by: Astrocloud
9 Replies

2. UNIX for Dummies Questions & Answers

SCP requests password despite common key

I created both a DSA and an RSA key for communication between two SSH servers. Each server has the same DSA and RSA key in their .ssh folders. Yet when copying files from one server to another using a client terminal, I get a password prompt. Why is that? What should I do to bypass the password... (18 Replies)
Discussion started by: SNorton
18 Replies

3. Shell Programming and Scripting

SCP command end with Host Key not found in database

Hi, I'm trying to copy a file from one server to remote server using SCP command. Below is the command i tried and got host key not found in database errror. scp sendfile.txt Remoteserver:/home/xxxx/. Error Message: Host key not found from database Key fingerprint:... (2 Replies)
Discussion started by: skcvasanth
2 Replies

4. Shell Programming and Scripting

automating RSA key pair generation

I want to automate the process of generating RSA keys. I want to remotley login to a linux machine from a windows maching without having to enter a password. For this I need to generate the RSA key pair. but I want to do this procedure on alot of linux machines. For which I was looking to automate... (2 Replies)
Discussion started by: lassimanji
2 Replies

5. Shell Programming and Scripting

date and time on every time pressing return key

Hi all, I have a situation here, I want that every time when i press "enter key" in bash prompt i want the date command to be executed. i have tried to make some changes in "/etc/bashrc" but no luck. Thanx in advance (1 Reply)
Discussion started by: xander
1 Replies

6. UNIX and Linux Applications

SSH: Avoiding password prompt with rsa key generation

Hi, I am using a remote storage service for backing up our data - we want to have a script run as part of a cron job which would do the backups from our local Linux machine to the service's Linux machine. I want to use tar and ssh to do this (rather than mounting the disk and using cp) .... (5 Replies)
Discussion started by: same1290
5 Replies

7. UNIX for Dummies Questions & Answers

SCP using a dsa key

Hello all, My first post in this forum. I am trying to download a file from a server to which I have been granted access. They setup a DSA public key and I have a local private key. When i try to download the file it prompts me for my password. How can I tell unix to use the DSA key... (1 Reply)
Discussion started by: who2
1 Replies

8. Shell Programming and Scripting

Sequence number generation on a key column

Hi Folks, Can you help me with this issue: I have to generate the numbers say from 1001 for each record in a file based on a key field, the catch is the generated number should be unique based on key column. (EMP_NUMBER) Example: Input File: EMP_NUMBER EMP_NAME 8908 ... (6 Replies)
Discussion started by: sbasetty
6 Replies

9. UNIX for Advanced & Expert Users

Setting Up public key on Windows for ssh/scp

Hi, I am trying to scp a file from our Unix server to the local Windows machine.I have created the key pair in Unix server using ssh-keygen command in unix. But I am not sure where can we put the public key(generated on Unix) in Windows machine so that scp from Unix machine to Windows is... (3 Replies)
Discussion started by: dennis.jacob
3 Replies

10. UNIX for Advanced & Expert Users

How to restrict Core file generation after scp (of SSH) command executed in UNIX

Hi, I am getting core file in local machine after trasfer files to other machine by using scp (secure copy) of SSH in UNIX. Could any one please tell me how to restrict core file generatation by using scp command. (4 Replies)
Discussion started by: nrsekhar
4 Replies
Login or Register to Ask a Question