yes, I start the jar wit root account but strangely does not work.
I tried also with ssh library (for B4A)
B4X:
Sub SetSSH
Try
ssh.Initialize("ssh", "127.0.0.1", 22)
ssh.DebugOutput = False
ssh.authenticateWithPassword("pi", "raspberry")
ssh.execCommand("sudo date -s " & d, 10)
Catch As Exception
Log(LastException.Message)
End Try
End Sub
but the problem is the same.
It's possible set the date from file with -f option?
You need to enable the super user "root” ( and change PermitRootLogin if you use ssh ). sudo may not work
ssh.authenticateWithPassword("root", "rootpasswd")
Enabling The Root Account By default the root account is disabled, but you can enable it by using this command and giving it a password
sudo passwd root
Now you can log into your pi as the root user. Whilst this opens up security concerns its sometimes very useful, for instance when developing with netbeans and remotely running applicaiotn that access the IO pins.
If it doesn't work check the ssh config
sudo nano /etc/ssh/sshd_config
Search for PermitRootLogin and change it to yes
You can undo logging in as root again using this command
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.