View Single Post
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#1
Lost SSH Root Access? Let me help you!


I spent a while figuring this problem out.
I access my N9 via SSH through Wifi using WinSCP on my PC. I like to modify my device(s) so I do it as root.
Recently there was an update to SSH on N9 which disables root access through SSH. Problem is, you need to be root to enable it. If youre like me and have come across this problem, let me help you. Then PR1.1 has disabled root access in another config file.



Pre PR1.1

1. open xterm
2. devel-su [enter] then your root password [enter]
3. nano /etc/ssh/sshd_config

then use the arrowkeys on the virtualkeyboard to navigate the file to "Authentication" section and change 'permitRootLogin' to yes

Code:
# Authentication:
PermitRootLogin yes
once done, ctrl+o then enter saves the file
ctrl+x closes Nano

------------------------------------------------------------------------

Post PR1.1, to enable remote root login again (or rather make it controllable via
/etc/ssh/sshd_config like before):


Code:
echo -e 'mkdir -m 0755 -p /var/run/sshd\nexec /usr/sbin/sshd $SSHD_OPTS' >> /etc/default/ssh
pkill -9 /usr/sbin/sshd
and reboot.

Last edited by F2thaK; 2011-11-15 at 13:15.
 

The Following 10 Users Say Thank You to F2thaK For This Useful Post: