public key file problems - Suse

This is a discussion on public key file problems - Suse ; Hi, What I do: - I create a key public key file (shell script) - I copy it to the server by rsync (shell script) - On the server a file parses the key file and appends the content to ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: public key file problems

  1. public key file problems

    Hi,

    What I do:
    - I create a key public key file (shell script)
    - I copy it to the server by rsync (shell script)
    - On the server a file parses the key file and appends the content to
    ~/.ssh/authorized_keys (perl script)
    - I now can access the server by ssh with no password prompt
    - I'm also able to copy a file by scp with no password prompt (scp test3
    root@192.168.101.3:/usr/share/NovaxTSP/test3)
    - Now a file gets copied by scp with this syntax:
    scp $tempfile root@$ip:$upload_dir/$newfile (shell script)
    - Now I'm not able to ssh anymore, it's asking me for a password
    HUH???
    I copied the ~/.ssh/authorized_keys to ~/.ssh/authorized_keys_backup when it
    worked and did a diff ~/.ssh/authorized_keys ~/.ssh/authorized_keys_backup
    to see if it has changed but it doesn't return me anything. I can remove
    ~/.ssh/authorized_keys and start over again and it's happening the same way
    over and over again. /var/log/messages doesn't tell me anything either.
    Isn't this weird???? What could this be? This is exactly something i
    wouldn't have needed before my Easter break
    Please help me being happy!
    --
    chEErs roN

  2. Re: public key file problems

    On Mar 19, 7:35 pm, Ron Eggler wrote:
    > Hi,
    >
    > What I do:
    > - I create a key public key file (shell script)
    > - I copy it to the server by rsync (shell script)
    > - On the server a file parses the key file and appends the content to
    > ~/.ssh/authorized_keys (perl script)
    > - I now can access the server by ssh with no password prompt
    > - I'm also able to copy a file by scp with no password prompt (scp test3
    > r...@192.168.101.3:/usr/share/NovaxTSP/test3)
    > - Now a file gets copied by scp with this syntax:
    > scp $tempfile root@$ip:$upload_dir/$newfile (shell script)
    > - Now I'm not able to ssh anymore, it's asking me for a password
    > HUH???
    > I copied the ~/.ssh/authorized_keys to ~/.ssh/authorized_keys_backup when it
    > worked and did a diff ~/.ssh/authorized_keys ~/.ssh/authorized_keys_backup
    > to see if it has changed but it doesn't return me anything. I can remove
    > ~/.ssh/authorized_keys and start over again and it's happening the same way
    > over and over again. /var/log/messages doesn't tell me anything either.
    > Isn't this weird???? What could this be? This is exactly something i
    > wouldn't have needed before my Easter break
    > Please help me being happy!
    > --
    > chEErs roN



    Start simpler. Add an echo before your scp line:

    echo scp $tempfile root@$ip:$upload_dir/$newfile

    Then you'll see exactly what is taking place and if it's what you're
    expecting.

    --
    Andy

+ Reply to Thread