Closed nonphiksion closed 4 months ago
I understand that the ssh server username for my Ubuntu machine is not root, but rather dell, and the hostname is the name of the machine itself. I was hoping that I could change the server username using the ish app on my iPhone. That is, I created another server with the ish app, and it's the username I wish to change from root.
I tried creating a config file within the directory .ssh from the root directory, but to no avail.
You can create a new user by using adduser
and then switch to this user by holding down the settings button in iSH for a few seconds, scrolling down, and changing the root
in the launch command. You'll probably also want to install sudo
, and add your new users to the sudoers file.
You cannot currently change your hostname in iSH, but you can use your device's name when SSHing, like user@iphone-name.local
, e.g. martin@Martins-iPhone.local
.
Wow, thank you. Please, how do I add the new user to the sudo file?
Easiest way would probably be to add a usernamehere ALL=(ALL) ALL
line to /etc/sudoers
Alright. Thank you so much!
Cheers, no problem!
Easiest way would probably be to add a
usernamehere ALL=(ALL) ALL
line to/etc/sudoers
Based on this website: https://wiki.alpinelinux.org/wiki/Setting_up_a_new_user, alpine uses something else called doas
instead of sudo.
@nonphiksion
Hi, please how do I change my username from root to any name of my choice?
Also I would like to change my hostname too to something simpler so I can login easily. My hostname currently is the ip address of either my iPad or iPhone if I am ssh from any one of them to the other.