sftp - Setting up Public Authentication
From: MellyGirl (melly-girl_at_verizon.net)
Date: 09/24/04
- Next message: MellyGirl: "sftp - Setting up Public Authentication"
- Previous message: Richard E. Silverman: "Re: Confusing! ssh, ssh1, ssh2, etc."
- Next in thread: Travis Spencer: "Re: sftp - Setting up Public Authentication"
- Reply: Travis Spencer: "Re: sftp - Setting up Public Authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 24 Sep 2004 05:11:25 GMT
I have been working on providing my group with instructions on how to write
scripts using sftp. Of course, the one thing we do not want is for the
scripts to stop due to sftp wanting a password. I know that this question
has come up several times in the newsgroup, but can someone direct me to any
sort of documentation other than man pages for doing this.
So far, I follow this pattern - sometimes I can get it work with no problems
and other times, the script will stop for a password:
System A is the source; System B is the target.
1. Using sftp manually, I connect from A to B and B to A to make sure that
each system has a key defined in the known_hosts file.
2. Using ssh-keygen -t dsa on the source system, I create a blank
passphrase. In my ~/.ssh directory, I get id_dsa and id_dsa.pub created
with the key.
3. On the target machine in ~/.ssh, I create a file called authorized_keys
(chmod 744) and put the information that is in the id_dsa.pub from the
source machine in this file. I also make sure that the information is in
one line - no line breaks.
>From this point, I create a very simple test script to upload a file
sftp -b batchfile myid@target
As I mention, sometimes, I have no problems and other times, I get prompted
for a password. If I change the script to the following:
sftp -oBatchMode=yes -b batchfile myid@target
then, I get a message indicating that it is denied and must have either a
key, password, and etc.
I have seen mentioned to turn debugging on the server machine - I do not
have "root" access, can a regular user turn the debugging on?
I apologize for asking so many newbie question, however, this is all fairly
new to me.
Thanks!
- Next message: MellyGirl: "sftp - Setting up Public Authentication"
- Previous message: Richard E. Silverman: "Re: Confusing! ssh, ssh1, ssh2, etc."
- Next in thread: Travis Spencer: "Re: sftp - Setting up Public Authentication"
- Reply: Travis Spencer: "Re: sftp - Setting up Public Authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|