We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

ssh login with root password (generated or manually entered) fails

asked 2015-08-30 22:44:55 +0200

Atran_Beluc gravatar image

In the past i could access my jolla phone via putty (with a Win7 host) via USB with developer access activated and with a generated password. Now i could not access it with the same method and a newly generated or manually entered password even if i deactivate the developer access first and then reactivate it again (and disconnect+reconnect the usb cable). I always get the error message "Access denied" in the putty window...

What can i do?

edit retag flag offensive close delete

Comments

2

Do you log in as user nemo or as root?

ossi1967 ( 2015-08-30 23:12:48 +0200 )edit

tried to login with putty and user "nemo" and the generated password... result: OK

Atran_Beluc ( 2015-09-03 14:15:47 +0200 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2015-08-31 00:18:24 +0200

chemist gravatar image

for direct root login you need to set the password with passwd first (as root)

edit flag offensive delete publish link more

Comments

1

And edit the sshd_config in /etc to allow root logins!

Philippe De Swert ( 2015-08-31 10:38:20 +0200 )edit
1

Exactly. Comment out PermitRootLogin yes and it should work again.

J4ZZ ( 2015-08-31 19:20:59 +0200 )edit

Iirc no need to alter sshd_config, at least mine is not altered!

chemist ( 2015-08-31 22:33:10 +0200 )edit

Right, it was working fine before. But now, after updating to 1.1.7.28 I have to edit sshd_config to get the root login working again.

J4ZZ ( 2015-09-02 16:20:30 +0200 )edit

i thought that generating a new password via the system properties dialog (developer mode) sets also the root password... but now i understand that it sets the password for user "nemo". Nnow i can't even remember my (original) root password and so i cannot set a new one why the terminal app and the passwd command.

And why do i have to modify the sshd_config after an update? This can only be a (big) bug.

Atran_Beluc ( 2015-09-03 14:11:26 +0200 )edit

Still applies to 1.1.9.28 (Eineheminlampi).

J4ZZ ( 2015-09-20 19:23:42 +0200 )edit

Please, could you tell me what I have to do to solve this issue? I've updated my jolla to Sailfish 2.0.1, and I get error "Access denied" when I try to access as root via winscp/putty.

carmenfdezb ( 2016-01-19 23:07:17 +0200 )edit

did you set a root password?

chemist ( 2016-01-19 23:20:03 +0200 )edit

Yes, I set password with "passwd" as root

carmenfdezb ( 2016-01-19 23:27:32 +0200 )edit

is root access enabled in sshd config? and see what ssh logs from putty show

chemist ( 2016-01-19 23:29:52 +0200 )edit

If I edit sshd_config with nano:

    #       $OpenBSD: sshd_config,v 1.97 2015/08/06 14:53:21 deraadt Exp $

    # This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# The default requires explicit activation of protocol 1
#Protocol 2

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024

# Ciphers and keying
#RekeyLimit default none

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin prohibit-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#RSAAuthentication yes
#PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile      .ssh/authorized_keys

#AuthorizedPrincipalsFile none

#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no
UsePAM yes

#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation sandbox          # Default for new installations.
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none

# no default banner path
#Banner none

# override default of no subsystems
Subsystem       sftp    /usr/libexec/openssh/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       PermitTTY no
#       ForceCommand cvs server
carmenfdezb ( 2016-01-19 23:57:08 +0200 )edit

Sorry my ignorance, should I add "PermitRootLogin yes" line?

carmenfdezb ( 2016-01-20 00:12:03 +0200 )edit

might be an idea

chemist ( 2016-01-20 00:57:41 +0200 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2015-08-30 22:44:55 +0200

Seen: 686 times

Last updated: Aug 31 '15