中村です。
岩男さま、ありがとうございます。

うちの環境ではどうも、そうなってくれません。
> ssh myhost.mydomain.jp "chsh -s /bin/sh"
ka...@myhost.mydomain.jp's password:

何も表示されずに終わってしまいます。

> ssh myhost.mydomain.jp dmesg
ka...@myhost.mydomain.jp's password:

こちらでも何も表示されません。

何が問題なのか、さっぱり解りません。

冗長モードで表示した所次のようになりました。
何か解決の糸口はありますでしょうか?
> ssh -v myhost.mydomain.jp "chsh -s /bin/sh"
OpenSSH_5.1p1 FreeBSD-20080901, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to aqua.noii.jp [xxx.yyy.105.209] port 22.
debug1: Connection established.
debug1: identity file /home/syskanri/.ssh/identity type 0
debug1: identity file /home/syskanri/.ssh/id_rsa type -1
debug1: identity file /home/syskanri/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version
OpenSSH_5.1p1 FreeBSD-20080901
debug1: match: OpenSSH_5.1p1 FreeBSD-20080901 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 FreeBSD-20080901
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'myhos.mydomain.jp' is known and matches the DSA host key.
debug1: Found key in /home/kanri/.ssh/known_hosts:10
debug1: ssh_dss_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/kanri/.ssh/id_rsa
debug1: Trying private key: /home/kanri/.ssh/id_dsa
debug1: Next authentication method: password
ka...@myhost.mydomain.jp's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessi...@openssh.com
debug1: Entering interactive session.
debug1: Sending command: chsh -s /bin/sh
debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0
debug1: client_input_channel_req: channel 0 rtype e...@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 1344, received 1888 bytes, in 0.1 seconds
Bytes per second: sent 20135.8, received 28285.9
debug1: Exit status -1

何かデータのやりとりがやられていないようなのですが・・・。

ご指導よろしくお願いします。

Kouichiro Iwao さんは書きました:
> 岩男です。
> 
> $ ssh example.jp "chsh -s /bin/sh"
> ではうまくいきませんか?うちの環境ではこれで問題ありませんでした。
> 7.2-RELEASEでユーザ情報の管理は通常の /etc/master.passwd で
> 行っている環境です。
> 
> sshがパスワードを要求した後、chshが自分のパスワードを要求しますが、
> chshのパスワードはエコーバックされるので注意してください。
> 
> 余談ですが、一度ログインに失敗した後、
> $ ssh example.jp dmesg
> でなにかヒントとなる情報が得られますね。
----------------------------------------------------
 中村 光洋 (Mitsuhiro Nakamura)
  mailto:chiauz...@mbd.nifty.com

Reply via email to