ssh-agent - Linux

By Tom
at 2010-12-18T16:26
at 2010-12-18T16:26
Table of Contents
我每天要固定從log server上撈log 到我的desktop。
log server只開放ssh。我寫了一個shell script來故這件事。
連到log server的方式是public key authentication。
直接執行這個script是正確可以取回log file,不過叫cron執行就有問題。
cron的訊息是:
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
我己經把private key加到ssh-agent裡; ssh-add ...
環境是ubuntu 9
key 是由ssh-keygen 產生,以ssh-copy-id的方式放到remote server
帳號是一般user權限
# get log file
....
for i in logdir1 logdir2 logdir3 ...
...
...
if $(ssh logman@$log_server test -e $src); then
scp logman@$log_server:$src/201* $dst_dir/$i || \
(echo "$i: honeynet copy failed !" && exit 1)
else
echo "$i: log files are not ready !"
exit 1
fi
...
---
我search了一下資料,不知是不是要用keychain?
我照search到的文章設了.profile 加上keychain ,變成gdm無法登入
thanks
--
Tags:
Linux
All Comments

By Jacky
at 2010-12-21T07:45
at 2010-12-21T07:45

By Queena
at 2010-12-26T07:43
at 2010-12-26T07:43

By Queena
at 2010-12-27T18:47
at 2010-12-27T18:47

By Caitlin
at 2010-12-28T21:49
at 2010-12-28T21:49
Related Posts
雙網卡NAT實做

By Madame
at 2010-12-18T15:40
at 2010-12-18T15:40
關於用wine開啟遊戲 (war3/sc2)

By Annie
at 2010-12-18T14:40
at 2010-12-18T14:40
手機上網速度超慢

By Cara
at 2010-12-18T01:14
at 2010-12-18T01:14
Linux上無法更新到OP11

By Daniel
at 2010-12-17T13:25
at 2010-12-17T13:25
remote control的問題

By Selena
at 2010-12-17T09:10
at 2010-12-17T09:10