LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-inte ract (https://www.linuxquestions.org/questions/linux-newbie-8/permission-denied-publickey-gssapi-keyex-gssapi-with-mic-password-keyboard-inte-ract-727648/)

MilanK 05-21-2009 04:29 PM

Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-inte ract
 
I'm trying to scp a couple of files from a RedHat Linux Enterprise 4 machine to a couple of other machines (one a Mac OSX and the other a Solaris). I see the same behavior with either remote machine. I'm able to manually scp files from my Linux machine to either remote machine without using a passphrase because I set up the appropriate public and private keys on all the machines. However, when I try to scp the same files as part of a cron script I get "Permission denied". Here are the relevant lines from my Cron Log attempting to scp to a remote machine called rem. Thanks very much.

+ /usr/bin/scp -p /home/Milan/file1 /home/Milan/file2 Milan@rem:/Users/Milan/Documents
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-inte ractive).
lost connection

Here are the relevant portions from verbose logs of the successful command-line scp (1) and the unsuccessful cron scp (2). I'd appreciate any insight anyone might be able to lend.

1.
debug1: Next authentication method: gssapi-with-mic
debug1: Miscellaneous failure
Unknown code krb5 195

debug1: Trying to start again
debug1: Authentications that can continue: publickey,gssapi-
keyex,gssapi-with-mic,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/Milan/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 433
debug1: Authentication succeeded (publickey).

2.
debug1: Next authentication method: gssapi-with-mic
debug1: Miscellaneous failure
Unknown code krb5 195

debug1: Trying to start again
debug1: Authentications that can continue: publickey,gssapi-
keyex,gssapi-with-mic,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/Milan/.ssh/identity
debug1: Trying private key: /home/Milan/.ssh/id_rsa
debug1: Offering public key: /home/Milan/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 433
debug1: PEM_read_PrivateKey failed

tandn 03-20-2012 03:44 AM

Hi friend,
May be your .ssh directory is too open, change this into 755 :)


All times are GMT -5. The time now is 06:57 AM.