Use sftp in scripts to transfer data from mainframe to Solaris


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Use sftp in scripts to transfer data from mainframe to Solaris
# 1  
Old 11-17-2009
Use sftp in scripts to transfer data from mainframe to Solaris

Hi,

I have a situation where in we have created shell scripts to transfer data from/to mainframe and Solaris. The scripts uses ftp commands line commands(get or put) to perform the task. Now due to security reasons, ftp will not be allowed and sftp will be used. Can anyone let me know what is the equivalent sftp commands for the following ftp commands:

1. ftp <ip address> - This is used to connect to mainframe
2. after it connects it prompts for userid and password (not sure what happens in sftp
3. at ftp prompt i can issue ls command to get a directory listing, cd command to change the directory.
4. get command to download the file and put command to upload data to mainframe from solaris.

I would appreciate if anyone can let me know the equivalent commands in sftp for the ones mentioned above.

Thank you.
bornon2303
# 2  
Old 11-17-2009
1. man sftp
2. sftp hostname... but you should not use it from automated mode
3. man scp
4. man ssh
5. mkdir ~/.ssh ; man ssh|grep authorized_keys
6. If you have used ftp then it seems that you are not aware that something might be insecure... Are you using telnet as well? Let me google that for you
7. Maybe you might use NFS?
8. Imagine the following: You have started ftp then something went wrong - but you have provided all the commands to ftp. Instead of "rm -rf my_file" you have executed "rm -rf /". Not possible? I think that it is quite possible...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File transfer using SFTP

Hi, I want to a transfer file from remote machine to a local machine using SFTP where both my local and remote machines are Ubuntu machines.So i wanted to write a unix bash script which uses SFTP command to transfer the file from remote to local machine. My remote server is 178.28.30.106. ... (14 Replies)
Discussion started by: shree11
14 Replies

2. Shell Programming and Scripting

Sftp : not able to print the echo statements after the sftp transfer

I had the below sftp script working perfectly but the problem is I am not able to send the echo statements . #!/bin/sh echo "Starting to sftp..." sftp admin@myip << END_SCRIPT cd /remotepath/ lcd /localpath/ mget myfiles*.csv bye END_SCRIPT echo "Sftp successfully." echo echo... (11 Replies)
Discussion started by: scriptscript
11 Replies

3. UNIX for Dummies Questions & Answers

Sftp from UNIX to mainframe

Hi, I have many scripts where i have used sftp for file transfer from unix box to unix box.. Now that we have to sftp files from unix to mainframe, i would like to know if that is possible. I just tried in the same way i did from unix to unix, but i got the error as connection refused. Are... (2 Replies)
Discussion started by: dnat
2 Replies

4. Solaris

Transfer files from windows to solaris with winscp (file protocol:SFTP)

Hello, I have a couple of zip files to be copied from my local drive to a folder in solaris10 residing in a VM ware. i am using WINSCP, I tried to get hold of the solaris hostname or ip using ifconfig -a , hostname|nslookup etc. when i create a new session in WINSCP using that IP and port... (6 Replies)
Discussion started by: herbich1985
6 Replies

5. UNIX for Dummies Questions & Answers

SFTP transfer does not complete

I am able to connect to a site and start a file transfer via SFTP, but when the file reaches "100%" -- the file does not complete and "stop". The 100% transfer status does not change (obviously), but the timer for SFTP keeps going and will not complete. This also happens when I try to get a file.... (2 Replies)
Discussion started by: loganban
2 Replies

6. Shell Programming and Scripting

Using SFTP and FTP to transfer data from One Remote Server To Another

HI I need to write a script in 415univ server which should go to 534unix server and move the files from there to windows server. I am not able to get it bcoz sftp prompt is not allowing ftp command. Can some one plz help me Thanks in advance (3 Replies)
Discussion started by: himakiran9
3 Replies

7. UNIX for Dummies Questions & Answers

UNIX sftp from mainframe

I have the following UNIX script which copies a file from a UNIX server in Canada to a UNIX server in the UK. LOG=/data/proj/sftp/canada.log DAT=`date "+%d/%m/%y %H:%M"` HOMEDIR=/data/proj/sftp TGTFILE=P_DATA.csv cd $HOMEDIR echo "\nStarting retrieval of Canadian Data at $DAT" >> $LOG ... (1 Reply)
Discussion started by: mishnok
1 Replies

8. AIX

Problems with SSH/SFTP between AIX and Mainframe

Hi, I'm not sure if this has been solved in this forum already but please do help me out if possible. Basically, I've already setup a passwordless SSH connection between 2 AIX IDs (say ID-1 and ID-2) with a Mainframe server ID (say MVSID). I'm able to successfully do an SSH from the AIX server to... (1 Reply)
Discussion started by: sambeet
1 Replies

9. UNIX for Dummies Questions & Answers

Issue: SFTP via Mainframe using BPXBATCH

Hi, I am trying to execute sftp transfer via the bpxbatch utility. I am getting an exit status of 16. Any idea what this means ? I have searched almost everywhere but couldn't find the mention of status 16. Below is the log: debug1: Next authentication method: publickey. ... (0 Replies)
Discussion started by: ali_asgar
0 Replies

10. Cybersecurity

Secure File Transfer for Mainframe systems

Hi guys, I would like to transfer files from UNIX machine to Mainframe system (using UNIX machine as client). The transfer process needs to be secure (i.e. data sent thro network should be encrypted using 128-bit encryption algorithm). I came to know that SFTP server is not available for Mainframe... (3 Replies)
Discussion started by: sydneymoon
3 Replies
Login or Register to Ask a Question