|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
sftp command
Hello folks
i want to know hoaw can i automate sftp command. When i am execute the script it sftp connect to host and ask for the password but i want password also to be supplied in batfile .It should not ask password on console . sftp -b batfile user@hostip |
| Sponsored Links |
|
|
|
|||
|
Here is how to do it:
sftp runs under ssh, so you need to get ssh passwordless connections going: ssh-keygen: password-less SSH login |
|
|||
|
Quote:
Hello Cant it be possibe that it can automaticaly read the password from the batfile and than connect |
|
|||
|
ssh keys provide passwordless access. ssh is NOT designed to allow -b to have a password in the batch file. As you leanred. You can probably find a workaround by writing a daemon with controlling terminal, but why do that? ssh has keyts for the purpose.
IF this does not suit you use ftp, It does allows passwords in a script. The reason for this - hardcoded passwords are a major security problem. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to use SFTP from command line without entering user and password | Hangman2 | UNIX for Advanced & Expert Users | 7 | 03-07-2009 03:22 AM |
| Specify password in SFTP command | shabu | Security | 3 | 10-10-2008 08:19 AM |
| sftp command for file transfer | mohanpadamata | UNIX for Advanced & Expert Users | 2 | 06-12-2008 10:45 AM |
| How to get the exit satus of a command which I executed in sftp prompt | Karteek | Shell Programming and Scripting | 2 | 04-09-2008 09:00 AM |
| Command ignored after sftp - korn shell | alienET | Shell Programming and Scripting | 1 | 03-24-2005 05:06 PM |