摘要:
assq(Key, List) - case lists:keysearch(Key, 1, List) of {value, {Key, Val}} - {value, Val}; _ - false end. get_option(Key, Options) - case lists:keysearch(Key, 1, Options) of {value, {_Key, Value}} - Value; _ - throw({error, {not_found, Key}}) end.get_option(Key, Options, Default) - case li 阅读全文
摘要:
1. 自动ssh/scp方法==A为本地主机(即用于控制其他主机的机器) ;B为远程主机(即被控制的机器Server), 假如ip为192.168.60.110;A和B的系统都是Linux在A上运行命令:# ssh-keygen -t rsa (连续三次回车,即在本地生成了公钥和私钥,不设置密码)# sshroot@192.168.60.110"mkdir .ssh" (需要输入密码)# scp ~/.ssh/id_rsa.pubroot@192.168.60.110:.ssh/id_rsa.pub (需要输入密码)在B上的命令:# touch /root/.ssh/authorized_ke 阅读全文