scp without password for destination server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting scp without password for destination server
# 1  
Old 01-16-2015
scp without password for destination server

I am using the below command to scp the file to destination server ($server).
The ssh keys have been created between the source and destination servers. Still I am getting password authentication after executing the below scp command:

Code:
scp $Local_dir/$file_pattern* $username@$server:/$ftp_dir/

Pls suggest

Last edited by Don Cragun; 01-16-2015 at 08:23 PM.. Reason: Add CODE and ICODE tags.
# 2  
Old 01-16-2015
What happens if you try a simple ssh connection?

If you get prompted for a password prompt for ssh also, use several "-v" options to get verbose output:

Code:
ssh -v -v -v ...

That should tell you what's wrong.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Sftp cannot see folder in destination server

I'm using sftp to connect from a Windows server (User ID is ssh1) to AIX server (User ID ftpeapsg) to access /sftp/ftphrssg/HRSSG/EAPSG in AIX server. User ftpeapsg is created on AIX server. Able to connect to AIX server fine without the need for password however not able to see the folder... (4 Replies)
Discussion started by: userguy
4 Replies

2. Shell Programming and Scripting

Check if remote destination is available before running scp command

I have a script on a Linux box which scp the files to windows server without any issues. but there are time frames where the windows server will not be available due to maintenance. hence I need to check if the remote location is available before running the scp command. scp... (3 Replies)
Discussion started by: gpk_newbie
3 Replies

3. UNIX for Beginners Questions & Answers

scp without password

Hello experts, OS : CentOS Could you please help me with the following scenario : I wish to use scp command in order to copy a file (say : f1.txt) from server 2 to server 1. Both servers have a common user (say : user1) configured. Also, the file is owned by the same user on both... (2 Replies)
Discussion started by: H squared
2 Replies

4. Shell Programming and Scripting

Command / Script to create touch file in destination server

Hello Team, Is there any Linux command / script available so that, I could create a simple 0 byte file in destination server by issuing the command from source server. If yes, Could you please let me know the possible solutions. in other words I just want to create a touch file in my home... (1 Reply)
Discussion started by: madhuraju
1 Replies

5. Shell Programming and Scripting

How to scp File from root user in one server to say crt user in another server and avoid password?

Can someone help in writing some script through which I can transfer file (scp) from root user in abc server to crt user in hfg server and can give the crt user password in script itself so that it doesn't prompt me every time for password (4 Replies)
Discussion started by: Moon1234
4 Replies

6. UNIX for Dummies Questions & Answers

destination directory for make install isc-dhcp-server

Hi there, I'm trying to install isc-dhcp-server from source. When I install it from package (eg. using aptitude), files created are : /usr/sbin/dhcpd /etc/dhcp/dhcpd.conf /usr/share/man/* But when I install from source (,.configure && make && make install), then files created are :... (0 Replies)
Discussion started by: chebarbudo
0 Replies

7. Linux

Regarding scp with out password

Dear all, I have two servers A and B. I want to do scp with out password between these two servers. I created ssh-keygen and copied the id-rsa.pub file to each of them in authorized_keys. But I could login only from B to A with out password. From A to B it is asking for a password. ... (5 Replies)
Discussion started by: jegaraman
5 Replies

8. UNIX Desktop Questions & Answers

ssh command doesnot excute commands in the destination server

Hi All, I have the below code where Iam connecting from xzur111pap server to xzur0211pap server thru ssh to execute some commands. ssh xzur0211pap spaceleft=`df -k /home |tail -1 | awk '{print $5}'` spaceleft=${spaceleft%\%} if ]; then echo "ALERT : HUFS(/home $spaceleft)" exit 0... (3 Replies)
Discussion started by: gaddamja
3 Replies

9. Shell Programming and Scripting

scp file to another server without asking for password

hi I tried reading some of the threads w.r.t scp/sftp file to another server in the same network without asking for password while copying files.....but couldnot succeed. i have generated the public key for the system using "ssh-keygen -t " and kept it in the .ssh/authorized_keys file. ... (8 Replies)
Discussion started by: aemunathan
8 Replies

10. HP-UX

FTP user information on destination server

Could any one please tell me how to check the ftp users information on the destination server ( Hp-UX ) ? Source server used to do FTP to my server ( that is destination server ) . Now , he is getting error that login is incorrect and unable to login into destination server . Please tell me how to... (3 Replies)
Discussion started by: randhir
3 Replies
Login or Register to Ask a Question