Transfert Files Using SFTP without prompt Password

Asked by Carlos Carvalho

Hi,

I've this wired situation.
Ftp seems not working with UBUNTU or the port is closed for TELNET
So I took SFTP, But i can't find a way to make it work without prompt the passwrd.
All Helps is appreciated.

#!/bin/bash
HOST=192.168.6.X
PORT=23
USER=oracle
FILE=/archives/CMOVP/archivelogs/*.arc
PASSWORD=xxxxxx
TARGET=/archives/CMOVP/archivelogs
sftp $USER@$HOST << EOF
$PASSWORD
mput $FILE $TARGET
EOF

Rgds

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Use SSH keys instead of passwords.

Can you help with this problem?

Provide an answer of your own, or ask Carlos Carvalho for more information if necessary.

To post a message you must log in.