-
- 1
- 2010/02/16(火) 21:23:37
-
SSHに関する情報交換のスレッドです。
FAQ、リンク集は >>2-5 あたり。
過去ログ
Part1:http://pc.2ch.net/unix/kako/976/976497035.html
Part2:http://pc.2ch.net/unix/kako/1028/10281/1028157825.html
Part3:http://pc5.2ch.net/unix/kako/1058/10582/1058202104.html
Part4:http://pc8.2ch.net/test/read.cgi/unix/1102242908/
Part5:http://pc11.2ch.net/test/read.cgi/unix/1145484540/
Part6:http://pc12.2ch.net/test/read.cgi/unix/1202782840/
-
- 860
- 2013/09/26(木) 00:53:28.78
-
mosh user@hogehoge.com で以下のエラーが出る。
zsh: No such file or directory
ssh_exchange_identification: Connection closed by remote host
/usr/local/bin/mosh: Did not find remote IP address (is SSH ProxyCommand disabled?).
原因わかります?
-
- 861
- 2013/09/26(木) 07:17:31.10
-
書いてあるとおりじゃね?
-
- 862
- 2013/09/26(木) 12:01:45.00
-
>>860
ログインシェルに問題があると見せかけて、実はIP絞ってましたという釣りですね。
そうでないのなら文面通りzshを探す(多分あるけど)
多分、ログインシェルとして認められてないとかじゃない?(設定時に気づくから違うかも)
-
- 863
- 2013/09/26(木) 23:59:04.21
-
>>862
ちな環境はMacだよ。
ログインシェルは変えてないからbashなはず。
-
- 864
- 2013/09/27(金) 00:20:41.50
-
>>863
sshではhogehoge.comにはつながるの?
-
- 865
- 2013/09/27(金) 08:17:58.45
-
>>864
もちろん!
-
- 866
- 2013/09/27(金) 08:20:47.83
-
あ、それから、hogehoge.comでmosh_serverを起動して、クライアントからkeyみたいなの使ってmosh_clientでつなぐとつながるよ
クライアントもサーバも両方Macね
-
- 867
- 2013/09/27(金) 10:05:28.20
-
実在ドメイン勝手に使うな
-
- 868
- 2013/09/27(金) 10:30:36.05
-
hogehoge.comの中の人なんでしょ?
-
- 869
- 2013/09/27(金) 11:35:35.84
-
>>866
moshスクリプトの247行目付近にexec sshをやっているところがあるのでそこをprintにして実行して、
実行可能なパラメータになっているか確認してください。
そのパラメータに問題があると思われるので、いろいろ変更してあたりをつけてみてはどうでしょうか。
-
- 870
- 2013/09/27(金) 17:05:22.55
-
>>867
ごめん。調べてから書くべきやったね。申し訳ない
-
- 871
- 2013/09/27(金) 17:19:18.54
-
某所を荒らしているhoge厨を召喚しようか?
-
- 872
- 2013/09/28(土) 14:25:39.38
-
>>869
printにしたけどよくわからんかった…使ってるのがzshやからダメなんかな?
bashからやったら成功したよ。
エスケープの違い?
-
- 873
- 2013/09/28(土) 23:04:31.16
-
>>872
クライアント側のシェル変えたらうまくいったって話?
とりあえずおめ
1) 1つのIPからport forwardして複数の仮想化したOSにつないでるんだけど
sshのfingerprintをhost:portで1つのOSとして管理する方法はありませんかね
2) mosh(クライアント)をwindowsから使うには仮想化使って*BSDやLinuxを動かすしかないですか?
ヒントになりそうなURLとかあったらください
-
- 874
- 2013/09/28(土) 23:19:19.29
-
IPってゆうな。クズ
-
- 875
- 2013/09/28(土) 23:33:55.14
-
意外と簡単に自己解決したw
レスthx
-
- 876
- 2013/09/29(日) 00:09:18.36
-
>>875
どうやって解決したの?
-
- 877
- 2013/09/29(日) 13:16:16.81
-
IP イップ
OS オッス
SSH スッシュ
-
- 878
- 2013/10/25(金) 02:00:08.70
-
debian wheezy 上の OpenSSH 6.0p1 へのログイン時に、5秒くらいのポーズが入ってしまう現象が起こっている。
自宅のクライアントからのアクセス時のみであるので、debian 上に DNS を立ててクライアントマシンのアドレスを
逆引きできるようにしたら解消した。
/etc/ssh/sshd_config に UseDNS no を記述しても解消はしなかった。
ログイン時のアドレス逆引き自体をさせなくして、クライアントマシンを DHCP 運用に戻したいのだが、
解決方法はないものだろうか。
お知恵をお借りしたい。
-
- 879
- 878
- 2013/10/25(金) 02:12:51.20
-
詳しい環境は以下の通り。
[サーバ]
OS: debian wheezy
SSH: OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013
IPアドレス: ホームゲートウェイから全ポートを転送するプライベートIPアドレス
(特に設定変更した項目)
・ポートを標準から変更
・Protocol 2
・MaxStartups 2:90:4
・PermitRootLogin no
・RSAAuthentication no
・ChallengeResponseAuthentication no
・PasswordAuthentication no
・UsePAM no
・UseDNS no
[クライアント]
OS: Windows
クライアントアプリ: putty 0.60 または OpenSSH 6.1p1, OpenSSL 1.0.1c 10 May 2012
IPアドレス: サーバと同セグのIPアドレス
-
- 880
- 878
- 2013/10/25(金) 02:20:18.01
-
開始からポーズを挟んでしばらくのsshdのデバッグログはこんな感じ
Oct 25 00:52:57 HOSTNAME sshd[14381]: debug3: fd 5 is not O_NONBLOCK
Oct 25 00:52:57 HOSTNAME sshd[14381]: debug1: Forked child 14430.
Oct 25 00:52:57 HOSTNAME sshd[14381]: debug3: send_rexec_state: entering fd = 8 config len 747
Oct 25 00:52:57 HOSTNAME sshd[14381]: debug3: ssh_msg_send: type 0
Oct 25 00:52:57 HOSTNAME sshd[14381]: debug3: send_rexec_state: done
Oct 25 00:52:57 HOSTNAME sshd[14430]: debug3: oom_adjust_restore
Oct 25 00:52:57 HOSTNAME sshd[14430]: Set /proc/self/oom_score_adj to 0
Oct 25 00:52:57 HOSTNAME sshd[14430]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Oct 25 00:52:57 HOSTNAME sshd[14430]: debug1: inetd sockets after dupping: 3, 3
Oct 25 00:53:02 HOSTNAME sshd[14430]: Connection from 192.168.100.33 port 56287
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug1: Client protocol version 2.0; client software version PuTTY_Release_0.60
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug1: no match: PuTTY_Release_0.60
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug1: Enabling compatibility mode for protocol 2.0
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-4
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug2: fd 3 setting O_NONBLOCK
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug2: Network child is on pid 14432
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug3: preauth child monitor started
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug3: privsep user:group 113:65534 [preauth]
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug1: permanently_set_uid: 113/65534 [preauth]
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug1: list_hostkey_types: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 [preauth]
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug1: SSH2_MSG_KEXINIT sent [preauth]
Oct 25 00:53:02 HOSTNAME sshd[14430]: debug1: SSH2_MSG_KEXINIT received [preauth]
...
-
- 881
- 878
- 2013/10/25(金) 02:26:20.11
-
クライアントはこんな感じ。
何か手掛かりがあれば良いのですが…
# ssh -vvv USER@HOSTNAME.FQDN -p 13422
OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012
debug2: ssh_connect: needpriv 0
debug1: Connecting to HOSTNAME.FQDN [192.168.100.90] port 13422.
debug1: Connection established.
debug1: identity file /home/.ssh/id_rsa type -1
debug1: identity file /home/.ssh/id_rsa-cert type -1
debug1: identity file /home/.ssh/id_dsa type -1
debug1: identity file /home/.ssh/id_dsa-cert type -1
debug1: identity file /home/.ssh/id_ecdsa type -1
debug1: identity file /home/.ssh/id_ecdsa-cert type -1
(ここで5秒ポーズ)
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0p1 Debian-4
debug1: match: OpenSSH_6.0p1 Debian-4 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.1
debug2: fd 3 setting O_NONBLOCK
debug3: put_host_port: [HOSTNAME.FQDN]:13422
debug3: load_hostkeys: loading entries for host "[HOSTNAME.FQDN]:13422" from file "/home/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
...
-
- 882
- 2013/10/25(金) 07:29:12.06
-
>>878
泥縄っぽいけどdnsmasqとかのHost NameオプションをあつかえるDHCPサーバを使うというのは?
-
- 883
- 2013/10/25(金) 07:42:18.57
-
逆引きとDHCPは関係ない。
ローカルなDNSを立てたくないというならDHCPで振り出すアドレス範囲が
逆引き出来るように/etc/hostsにアドレス範囲を全部追加しとけばいい。
-
- 884
- 2013/10/25(金) 09:07:17.02
-
逆引きしてるのは sshd じゃなくて hosts.allow。
-
- 885
- 878
- 2013/10/25(金) 09:15:59.73
-
ありがとう。
やっぱ、逆引きを正常にさせるのが良いのかな。
後出しですまないけれど、
/etc/hosts に追記してもうまくいかなかったので、逆引きチェックを止めるのを目指していた。
冷静になってみると networking の restart をサボってたかも。
>>882
nttのhgwについてるDHCPでは無理っぽい機能ですね。
興味はあるけど、この問題だけなら mac アドレス決めうちで固定のIPアドレスを払い出すのでも
解決できそうなので、今のところはパスします。
>>883
/etc/hosts で試してうまく行けば、そうしてみます。
お二人ともありがとう。
-
- 886
- 2013/10/25(金) 09:22:31.00
-
自由にならないDHCPサーバーを渡り歩いているオレは無料ddnsに「ローカルアドレス」を登録するという荒業に出た。
-
- 888
- 878
- 2013/10/25(金) 09:30:33.21
-
笑ったw
でもプライベートアドレスだからなー
仕事戻ります。また結果出たら報告します。
でわ。
-
- 889
- 2013/10/25(金) 09:38:36.33
-
ああ、逆引きか。無料ddnsは役に立たないね。忘れて。
-
- 890
- 2013/10/25(金) 09:46:03.97
-
>>887
多分sshd以外にも逆引きするものが入ってるよね。
素直にDNSキャッシュサーバーと逆引きウォールを入れるのが吉
-
- 891
- 2013/10/25(金) 10:16:04.02
-
逆引きウォールって言うのか。
-
- 892
- 2013/10/25(金) 10:29:05.41
-
http://cr.yp.to/djbdns/wall.html
https://code.google.com/p/google-dnswall/
など
-
- 893
- 2013/10/25(金) 10:37:38.91
-
sshd -u0
-
- 894
- 2013/10/25(金) 11:32:34.73
-
>>887
アドレスと IP の対応て何?
-
- 896
- 2013/10/25(金) 18:54:28.09
-
「アドレスと IP の対応」って結局何だったんだ。
-
- 897
- 878
- 2013/10/25(金) 21:17:59.61
-
fqdnとipアドレスの対応の書き間違えだった
-
- 898
- 878
- 2013/10/25(金) 21:40:45.22
-
改めて自鯖で試してみた。
・/etc/hosts にクライアントのIPアドレスとホスト名の対応を記載し
networking restart することで、DNS を止めてもポーズは解消
・/etc/default/ssh に -u0 を記載しても、残念ながら効果なし
-u0 は知らなかったので sshd の man 見て、DNS が有効になる他の
設定とかを把握した。
それらが有効になってないことも確認したが、UseDNS no も -u0 も
今回のポーズ解消には効果がなかった。
DNS はあまり運用したくない& DHCP で IPアドレスを配りたいので、
・特定MAC宛てに固定のIPアドレスを払出すよう設定
・サーバの /etc/hosts にその固定のIPアドレスとホスト名を設定
とすることにした。
レスくれた皆、ありがとう。
-
- 899
- 2013/10/25(金) 21:46:41.12
-
> ・サーバの /etc/hosts にその固定のIPアドレスとホスト名を設定
これで出来てるじゃん。/etc/hostsに書けってそういう事だよ。
DHCPが振り出すアドレス範囲はどんなヘッポコASDLルータでも指定可能なので、
hostsにその範囲のアドレス/ホスト名を全部するだけ
-
- 900
- 2013/11/04(月) 10:37:19.34
-
仮想化でOSのイメージを複製して別ホストとして運用する場合、
複製したSSHサーバホスト鍵で運用しちゃまずいよね?
VPSホスティングで
別の契約者に同じSSHホスト鍵を与えているケースがあるみたい。
https://sect.iij.ad.jp/d/2012/08/109998.html
↑と似た話だけど、組み込み機器というわけではないし、
乱数発生器の不良ということでもなく、
仮想化でそういうミスはよくあることなのかな。
-
- 901
- 2013/11/04(月) 13:38:01.68
-
VPSなんて使う時は普通自分のほうでも鍵の再生成するでしょ
「SSH 再生成」でググったページをペタリ
ttp://doruby.kbmj.com/totoro_blog/20130624/vps_ssh_
-
- 903
- 2013/11/06(水) 17:47:47.91
-
経路の暗号化のための機能、という認識しかないのであろう。
提供する側も使う側もw だからNSCがほくほくな訳で。
-
- 904
- 2013/11/06(水) 22:20:50.43
-
イメージ複製で鍵がコピーされないって
それはそれで問題あるよ
-
- 905
- 2013/11/07(木) 02:28:22.20
-
そこの業者がその仮想化プラットフォームに慣れてないってことはわかるかもね
普通に考えれば鍵生成前(もしくはインストール後に鍵削除して)スナップショット取って
コピー元のイメージにして、デプロイする時にIPアドレス振る流れで鍵生成がいいだろうけど
それが出来ない程度にそのプラットフォームに慣れてないってことじゃね?
-
- 906
- 2013/11/07(木) 03:06:23.41
-
他人が作った鍵なんか使わないだろ、普通。
-
- 907
- 2013/11/07(木) 04:42:19.23
-
鍵生成時のコマンドラインが業者から知らされてて、それが適切であればいいと思うけど?
それともパスフレーズの変え方がわからないとかそういうお話?
-
- 908
- 2013/11/07(木) 07:56:51.08
-
>>907
> 「初回接続時に警告が出るので[OK]を押しましょう」みたいな解説がはびこったせいで、
これが何でダメだと言われたのか意味わかってる?
-
- 909
- 2013/11/07(木) 08:35:22.59
-
わからん
-
- 910
- 2013/11/07(木) 11:03:04.73
-
じゃ、混乱の元だからこの話題には参加しないで。
このページを共有する