0

Ubuntu 14.04 - installed apt-get install openssh-server, username is sun and password is 1234 and root also has password 1234.

Remotely connecting and failing to allow me.

suns-MacBook-Air:js sun$ ssh [email protected]
[email protected]'s password: 
Permission denied, please try again.
[email protected]'s password: 
Permission denied, please try again.
[email protected]'s password: 
Permission denied (publickey,password).

suns-MacBook-Air:js sun$ ssh [email protected]
[email protected]'s password: 
Permission denied, please try again.
[email protected]'s password: 
Permission denied, please try again.
[email protected]'s password: 

suns-MacBook-Air:js sun$ ssh [email protected]
[email protected]'s password: 
Permission denied, please try again.
[email protected]'s password: 
Permission denied, please try again.
[email protected]'s password: 

EDIT: PC is using ipv4 and ipv6

$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether d4:be:d9:fd:84:fe brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.6/24 brd 192.168.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 2a02:a03f:24af:bd00:898f:6294:6b5e:94f6/64 scope global temporary dynamic 
       valid_lft 345642sec preferred_lft 85306sec
    inet6 2a02:a03f:24af:bd00:d6be:d9ff:fefd:84fe/64 scope global dynamic 
       valid_lft 345642sec preferred_lft 345642sec
    inet6 fe80::d6be:d9ff:fefd:84fe/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 1c:3e:84:01:bf:86 brd ff:ff:ff:ff:ff:ff
0

1 Answer 1

1

Edit: I skipped right to the end of the question and hadn't noticed you were trying to log in with a normal user account to begin with. The following explains why remote root login doesn't work by default in Ubuntu. Either way, it seems to have helped.

For the normal user stuff, just look in /var/log/auth.log. It'll tell you exactly what the problem is and that should give you a fairly decent idea of what you need to do.

But for root issues, there's a little block in /etc/ssh/sshd_config.

# Authentication:
LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes

That's the default and it means it'll only allow SSH key based authentication for root.
It won't allow you to log in with a password.

Obviously you could change the setting to yes but you're starting to unravel the security of Ubuntu. Having a working root login (especially with a super-crackable password) is usually a pretty awful (and unnecessary) idea. It would be easier to just use a SSH key.

3
  • 2
    This doesn't explain why the user's own account doesn't work.
    – muru
    Sep 17, 2014 at 8:58
  • 1
    @muru Fair point, added a block at the top for it.
    – Oli
    Sep 17, 2014 at 9:31
  • NO - its working now since i followed Oli suggestion, it was my mistake, the username was not sun but it was sun1
    – user25165
    Sep 17, 2014 at 9:32