I can't ssh login to vtysh

Hi all:
system: openwrt 15.05.
software: dropbear , vtysh.
I can't ssh login to admin,But I can telnet login to vtysh.
cat /etc/passwd

  • root:x:0:0:root:/root:/bin/ash

  • daemon:*:1:1:daemon:/var:/bin/false

  • ftp:*:55:55:ftp:/home/ftp:/bin/false

  • network:*:101:101:network:/var:/bin/false

  • nobody:*:65534:65534:nobody:/var:/bin/false

  • admin:x:0:0:Linux User,,,:/home/admin:/usr/bin/vtysh

    When I change admin:x:0:0:Linux User,,,:/home/admin:/usr/bin/vtysh to admin:x:0:0:Linux User,,,:/home/admin:/bin/ash , I can ssh login to admin.

While it doesn't address your question, you really should update your firmware to 18.06.1. Chaos Calmer [15.05] is no longer supported or maintained.

  • Also, OpenWrt is a single user OS, so unless you're deploying an extremely locked down sudoers config, utilizing an account other than root is pointless.
1 Like

You should check the logs.

  1. Users (here root and admin) are not allowed to have the same uid/gid. Both have "0" here. The "0" is for root only. Usually "normal" users have uid/gid >= 1000.
  2. I wouldn't wonder if telnet does not care about point 1.
  3. If you want to manage users you should install the tools to manage things like uid/gid for you. E. g. adduser, addgroup, deluser, delgroup, sudo, ...
  4. That was vgaetera has written. Logread should point you to the error.
1 Like