パスワードを使用してリモートサーバーにSSHとして接続することはできません。

パスワードを使用してリモートサーバーにSSHとして接続することはできません。

Fedora 17 Linux端末でVPN経由で大学サーバーに正常に接続しました。

$ sudo openconnect -u UNIVERSITY_USERNAMEID sslvpn.nameofuniversity.edu
[sudo] password for PCUSERNAME: 
Attempting to connect to xxx.xxx.xxx.xxx:xxx
SSL negotiation with sslvpn.nameofuniversity.edu
Connected to HTTPS on sslvpn.nameofuniversity.edu
GET https://sslvpn.nameofuniversity.edu/
Got HTTP response: HTTP/1.0 302 Object Moved
SSL negotiation with sslvpn.nameofuniversity.edu
Connected to HTTPS on sslvpn.nameofuniversity.edu
GET https://sslvpn.nameofuniversity.edu/+webvpn+/index.html
Please enter your username and password.
Password:
POST https://sslvpn.nameofuniversity.edu/+webvpn+/index.html
Got CONNECT response: HTTP/1.1 200 OK
CSTP connected. DPD 30, Keepalive 0
Connected tun0 as xxx.xx.xx.xx, using SSL

その後、新しいターミナルを開き、sshキャンパス内にいるときに通常機能するコマンドを実行しました。端末に次の出力が表示されます。

# ssh -vvv -Y UNIVERSITY_USERNAMEID@server
OpenSSH_5.9p1, OpenSSL 1.0.0j-fips 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 50: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to server [xxx.xxx.xx.xx] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
ssh_exchange_identification: Connection closed by remote host

役に立たなかったので、ファイルに以下を追加しました。/etc/hosts.allow

SSHD: ALL
SSHD: .nameofuniversity.edu : all
SSHD: ipaddress : all

ここで何が間違っている可能性がありますか?

ベストアンサー1

2つの可能性は次のとおりです。

  1. SSHを介して接続しようとしているホストは、特定のIPアドレス(たとえば、1つ以上の大学VLANのアドレス)からのみ接続を許可します。 VPN アドレスを「ローカル」として認識するように設定していない可能性があります。

  2. ホストは特定のアドレスでパスワードベースの認証を許可するように構成されていますが、他のすべてのアドレスではSSHキーが必要です。その場合は、公開鍵と秘密鍵のペアを作成し、次に大学内でログインするときに~/.ssh/authorized_keysファイルに公開鍵を挿入してください。

私は私が働いている大学のいくつかのコンピュータ(自宅のコンピュータや他のいくつか)に後者を構成しました。これは、ホストをスクリプトの永続性に脆弱にすることなく、ユーザーにリモートSSHアクセスを許可する便利な方法です。 SSHポートを攻撃してください。ユーザーはキャンパスで公開鍵アクセスを設定し、それを使用して自宅(または会議など)で接続できます。

おすすめ記事