Sponsored Content
Operating Systems AIX Automate SFTP UNIX to Windows Post 302314215 by zTodd on Thursday 7th of May 2009 05:35:37 PM
Old 05-07-2009
I had a project where I needed to automate retrieving files from a vendor, so I used ssh-keygen and gave the vendor the public key from that, and it worked fine.

But if I need to automate sending files using SFTP, would I still generate the key pair from the server that I'm sending from? From what I've learned about PGP encryption, it's always the side receiving the file that has to provide their public key to the side sending the file. Is SSH key encryption different than PGP key encryption?

How does SSH key encryption and SFTP work for sending files? Does it use the private key to encrypt the file, and then then the receiver uses the public key to decrypt the file? That's opposite of how PGP works from what I understand, but maybe SSH just doesn't work the same as PGP.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SFTP files from windows drive E: to unix

Hello friends, I was doing this test script which would take a file from my own E: drive to the unix server which i access from a putty. I tried sftp <osuser>@<ipaddress> but it didn't work. does the windows client have to be a server installation? i was trying on win xp from... (4 Replies)
Discussion started by: pranavagarwal
4 Replies

2. Shell Programming and Scripting

SFTP from windows E:/ to unix server

Hello All :), I am making a script in the ksh to Secure FTP a set of files from the E:/ drive in windows a computer to a unix server. Had it been in the unix directory, I could have used the expect utility to use the non-interactive mode for sftp, #!/usr/local/bin/expect #!/bin/ksh ... (12 Replies)
Discussion started by: pranavagarwal
12 Replies

3. Shell Programming and Scripting

Passwordless sftp from UNIX to windows site

Hallo all , I researched many article in this forum as well as googled. But could not get any help. I request the forum to extend some help. Issue: Want to do a passwordless sftp from an unix machine to windows action taken : 1) on local unix machine ssh-keygen -t dsa 2) Next step ,... (2 Replies)
Discussion started by: konark
2 Replies

4. Shell Programming and Scripting

automate sftp using unix script

Hi All, I need to write a UNIX script that automates the sftp process. I should be able to do a sftp to a secure box and get a file from there. I am having a problem doing this because no matter what I do, when I run my script, I get a prompt at command line asking for a password. How could I... (34 Replies)
Discussion started by: priyamurthy2005
34 Replies

5. Shell Programming and Scripting

sftp from unix to windows using keys

I'm working on setting up an automated script on a unix server to secure ftp (get) a file from a remote host which is a windows server with Vshell . I understand in order for the paswword-less authentication to work , I need to copy the authorization keys of our server(Solaris) to the remote host... (1 Reply)
Discussion started by: thrashers
1 Replies

6. Shell Programming and Scripting

sftp connection from Unix to windows

Hi guyz, I have a Solaris 5.9 box from which i need to connect to a windows server using Coreftp (passwordless login). Coreftp is installed on windows and in solaris, it is already available.I generated a pair of key(public,private) in windows and specify pub key over there, edit the know_hosts... (7 Replies)
Discussion started by: Renjesh
7 Replies

7. AIX

sftp between Unix & windows

Guys, sftp between Unix & Windows I'd like to get good software or a way to how to configure sftp between ( windows to Unix ) and ( Unix to windows ) to be automatic login between the different operating systems without asking password .. Pls assist in this regard … (3 Replies)
Discussion started by: Mr.AIX
3 Replies

8. Shell Programming and Scripting

SFTP from Unix to Windows

Hi all Not sure where I should be posting this so apologies if it's in the wrong section. I'm trying to set up a system where we can copy a file (get) from a Windows server to a Unix server using SFTP in an automated way. I've installed CoreFTP Server on the Windows server and can connect... (2 Replies)
Discussion started by: huskie69
2 Replies

9. UNIX for Dummies Questions & Answers

SFTP - UNIX to Windows without keys

When I try to SFTP from our UNIX box to an outside vendor using passwords - no keys, I am immediately get disconnected. We have the FIREWALL open because I get prompted for the password. Here's the error: sftp userid@sftp.test.com Connecting to sftp.test.com... userid@sftp.test.com's... (5 Replies)
Discussion started by: blt123
5 Replies

10. Shell Programming and Scripting

Needed SFTP script from windows to UNIX server and from UNIX to windows server(reverse SFTP)

hi guys, i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not and again i have to reverse sftp the files from unix to windows server..... regards, Vasa Saikumar. (13 Replies)
Discussion started by: hemanthsaikumar
13 Replies
OPENSSL_PUBLIC_ENCRYPT(3)						 1						 OPENSSL_PUBLIC_ENCRYPT(3)

openssl_public_encrypt - Encrypts data with public key

SYNOPSIS
bool openssl_public_encrypt (string $data, string &$crypted, mixed $key, [int $padding = OPENSSL_PKCS1_PADDING]) DESCRIPTION
openssl_public_encrypt(3) encrypts $data with public $key and stores the result into $crypted. Encrypted data can be decrypted via openssl_private_decrypt(3). This function can be used e.g. to encrypt message which can be then read only by owner of the private key. It can be also used to store secure data in database. PARAMETERS
o $data - o $crypted - This will hold the result of the encryption. o $key - The public key. o $padding -$padding can be one of OPENSSL_PKCS1_PADDING, OPENSSL_SSLV23_PADDING, OPENSSL_PKCS1_OAEP_PADDING, OPENSSL_NO_PADDING. RETURN VALUES
Returns TRUE on success or FALSE on failure. SEE ALSO
openssl_private_encrypt(3), openssl_private_decrypt(3). PHP Documentation Group OPENSSL_PUBLIC_ENCRYPT(3)
All times are GMT -4. The time now is 06:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy