Você menciona que o segundo servidor está usando o Andrew File System (AFS).
Eu não trabalhei com isso, mas pelo que entendi, o AFS é um sistema de arquivos protegido por Kerberos que requer um ticket do kerberos para funcionar. Isso significa que você precisa estar conectado ao território Kerberos do seu site para poder acessar seu diretório pessoal.
Se você fizer logon com a senha, server2
provavelmente será configurado para que você efetue o logon em seu território do Kerberos por meio do PAM. Se você estiver usando chaves SSH, no entanto, server2
não obterá as informações necessárias para fazer isso e você não poderá acessar seu diretório pessoal.
Felizmente, na saída ssh -v
da sua pergunta, podemos inferir que seu servidor tem GSSAPI
autenticação ativada. Isso deve permitir que você execute um logon sem senha, desde que você tenha um ticket kerberos válido para o seu território. Faça o seguinte:
-
Faça logon no
server2
e execute o programaklist
. Isso retornará algo nas seguintes linhas:Ticket cache: FILE:/tmp/krb5cc_2000 Default principal: [email protected] Valid starting Expires Service principal 28-05-15 15:01:31 29-05-15 01:01:31 krbtgt/[email protected] renew until 29-05-15 15:01:28 28-05-15 15:02:04 29-05-15 01:01:31 IMAP/[email protected] renew until 29-05-15 15:01:28
procure a linha que começa com
Default principal:
. Ele diz qual é o seu kerberos principal (no exemplo acima, é[email protected]
). Anote isso. Observe que não é um endereço de e-mail e é sensível a maiúsculas e minúsculas; ou seja, o principal termina comEXAMPLE.ORG
, nãoexample.org
. - Na máquina do cliente, execute
kinit
com o nome do seu principal (ou seja, no exemplo acima, isso seriakinit [email protected]
). Se tudo correr bem, quando você executarklist
novamente, verá que tem um cache de tickets em sua máquina local. - Se você executar agora
ssh -K server2
, poderá fazer o login e o sistema não deverá solicitar uma senha.
Por favor, note que devido ao funcionamento do Kerberos, um cache de ticket tem validade limitada. Não é possível solicitar um cache de ticket com validade maior do que o configurado pelo administrador da região (que geralmente é de aproximadamente 10 horas). Quando o seu bilhete expirar, você precisará executar kinit
novamente e digitar sua senha mais uma vez.