sftp using private and public keys


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting sftp using private and public keys
# 1  
Old 06-24-2012
sftp using private and public keys

hi guys , i have few files i have to do sftp, the public and private key work like a magic , no problem at all

the syntax is as below
Code:
sftp -0 identityfile=~/ure/blsl/loc2/.ssh/id_rsa_ssh1 ssh1@remote >log_dir/file.timestamp<<end
lcd folder
cd folder 
put *
quit
end

================
my question is i dont understand what is id_rsa_ssh1 , because when u generate rsa private key , only id_rsa is generated , i am presuming they have changed the file name
and my second question is why in user@remote i.e., ssh1@remote , ssh1 is given as user (is ssh1 , the authorized keys in remote?), which is the same as name given in id_rsa_ssh. please let me know Smilie

Last edited by Franklin52; 06-24-2012 at 10:39 AM.. Reason: Please use code tags for data and code samples, thank you
# 2  
Old 06-24-2012
What os(unix, linux) and what command(ssh-keygen????) did you use to generate the private/public key pair?

This User Gave Thanks to spacebar For This Post:
# 3  
Old 06-24-2012
the os is sun solaris 5.03 the script was already there, i am trying to automate a process based on the same
# 4  
Old 06-24-2012
The private key genertated for user(ssh1) should be in the file(~/.ssh/id_rsa) and the public key in file(~/.ssh/id_rsa.pub).
The public key is sent to the remote host and inserted into file(authorized_keys).

Check out the info on these links:
http://shebang.brandonmintern.com/tips-for-remote-unix-work-ssh-screen-and-vnc
SSH Key based authentication setup from openSSH to SSH2 - saylinux.net
Chau Chee Yang Technical Blog: SSH: Public Key Authentication with OpenSSH
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

2. Virtualization and Cloud Computing

Private, Public and Hybrid Clouds

Hi all, Private, Public and Hybrid Clouds I'm now testing OpenStack; Home OpenStack Open Source Cloud Computing Software -Infrastructure as a Service (IaaS) -Platform as a Service (PaaS) -Software as a Service (SaaS) It is an Open Source software. I'm interested to know whether... (0 Replies)
Discussion started by: satimis
0 Replies

3. Shell Programming and Scripting

SFTP - Private and Public keys

Hi All, I have a query....say on server A, I have generated the Private and Public keys and shared the public key with server B. Now i can surelyconnect(without password) from server A to server B..... but can i similarly connect from server B to server A as well Regards (1 Reply)
Discussion started by: Arpit Narula
1 Replies

4. Shell Programming and Scripting

Shell script for SFTP using Public and private keys

Hi all, I needed a shell script for file transfering using public/private keys for authentication. Could you please help me out on this? A procedure to write a shell script is enough. Thanks in advance. Regards. Vidya N (8 Replies)
Discussion started by: Vidya N
8 Replies

5. Shell Programming and Scripting

What are public keys in ssh and how do we create the public keys??

Hi All, I am having knowledge on some basics of ssh and wanted to know what are the public keys and how can we create and implement it in connecting server. Please provide the information for the above, it would be helpful for me. Thanks, Ravindra (1 Reply)
Discussion started by: ravi3cha
1 Replies

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

7. HP-UX

Problem - Creating SSH Public/Private keys. Please help.

HI, I'm trying to create SSH public/private keys using following command. hp023:/users/vikram> ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/users/vikram/.ssh/id_rsa): rsa Enter passphrase (empty for no passphrase): Enter same passphrase... (9 Replies)
Discussion started by: vickramshetty
9 Replies

8. IP Networking

Setting up private and public ip on same machine.

Hi, We have a ftp server which is running on public ip and out side of firewall. Users out side of our network and users of our local network both using the same public ip and doing upload and downloading. Last few days we are facing bandwidth problem as internal network users increased. ... (1 Reply)
Discussion started by: abduljabbar_11
1 Replies

9. UNIX for Dummies Questions & Answers

ssh public/private Keys

Hello, I have an issue with an outside party trying to deliver a file to our server via SFTP. I have setup the .ssh directory under the home directory for the user account that is being used and setup the authorized_keys file with correct permissons etc for .ssh directory and file. We... (2 Replies)
Discussion started by: richo king
2 Replies

10. UNIX for Advanced & Expert Users

SSH public and private keys

Firstly, i apologise if i have posted in a wrong section of the forum. Please let me know which is the correct section my post should go to. I have to SCP a file from one server(server A) to another (server B). I read around that a secure way is to use public and private keys. Assuming my... (2 Replies)
Discussion started by: new2ss
2 Replies
Login or Register to Ask a Question