Sponsored Content
Top Forums Shell Programming and Scripting Shell script for SFTP using Public and private keys Post 302593960 by ygemici on Monday 30th of January 2012 03:56:33 AM
Old 01-30-2012
try like this after your pub key is in located `~/.ssh/authorized_keys` on the remoteIP host.
Code:
# ssh -i /path/id_rsa user@remoteIP

Code:
# ssh -i /path/id_dsa user@remoteIP

This User Gave Thanks to ygemici For This Post:
 

10 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

8. Shell Programming and Scripting

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 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... (3 Replies)
Discussion started by: rockymayavia
3 Replies

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

10. 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
PLAINRSA-GEN(8) 					    BSD System Manager's Manual 					   PLAINRSA-GEN(8)

NAME
plainrsa-gen -- generator for Plain RSA keys SYNOPSIS
plainrsa-gen [-b bits] [-e pubexp] [-f outfile] [-h] DESCRIPTION
plainrsa-gen can be used to generate Plain RSA keys for authentication purposes. Using Plain RSA keys is optional. Other possibilities are Pre-shared keys or X.509 certificates. -b bits bit length of the key. Default is 1024, recommended length is 2048 or even 4096 bits. Note that generating longer keys takes longer time. -e pubexp value of RSA public exponent. Default is 0x3. Don't change this unless you really know what you are doing! -f outfile outfile instead of stdout. If the file already exists it won't be overwritten. You wouldn't like to lose your private key by acci- dent, would you? OUTPUT FILE FORMAT
This is the secret private key that should never leave your computer: : RSA { # RSA 1024 bits # pubkey=0sAQOrWlcwbAIdNSMhDt... Modulus: 0xab5a57306c021d3523... PublicExponent: 0x03 PrivateExponent: 0x723c3a2048... Prime1: 0xd309b30e6adf9d85c01... Prime2: 0xcfdc2a8aa5b2b3c90e3... Exponent1: 0x8cb122099c9513ae... Exponent2: 0x8a92c7071921cd30... Coefficient: 0x722751305eafe9... } The line pubkey=0sAQOrW... of the private key contains a public key that should be stored in the other peer's configuration in this format: : PUB 0sAQOrWlcwbAIdNSMhDt... You can also specify from and to addresses for which the key is valid: 0.0.0.0/0 10.20.30.0/24 : PUB 0sAQOrWlcwbAIdNSMhDt... SEE ALSO
racoon.conf(5), racoon(8) HISTORY
plainrsa-gen was written by Michal Ludvig <michal@logix.cz> and first appeared in ipsec-tools 0.4. BSD
June 14, 2004 BSD
All times are GMT -4. The time now is 05:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy