Setup user local: Difference between revisions
(Created page with "=== Login === login as ''pi'', password ''raspberry'' - password may have changed Add a user called local, this leaves the pi user as is. This can save reformatting and rein...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== | Back to [[Robobot]] | ||
== Add user == | |||
login as ''pi'', password ''raspberry'' - password may have changed | login as ''pi'', password ''raspberry'' - password may have changed | ||
Line 20: | Line 23: | ||
Now it is possible to login (as ''local'') from network. | Now it is possible to login (as ''local'') from network. | ||
=== Get access using hostname === | |||
You may change the hostname by changing the name in /etc/hostname. If you do so, then you should restart before the new hostname works. | |||
Now from another PC on the local network | |||
ping hostname.local | |||
Get a console (terminal window) use SSH | |||
From linux: | |||
ssh -X local@hostname.local | |||
Or use putty (can be installed in both Linux and Windows - and probably also Apple). | |||
where "hostname" is replaced with the hostname in /etc/hostname. | |||
ask for the password (or look on the course page) | |||
===Connecting Raspberry pi to PC using cable=== | |||
Connect your PC with Robobot using a network cable. | |||
Your PC should receive an IP from the raspberry pi and the raspberry pi on the Robobot should have | |||
IP: 192.168.17.2, so logon (from Linux, or using putty): | |||
Linux console command: | |||
ssh local@192.168.17.2 | |||
Putty (Windows, Apple or Linux): | |||
use ssh, IP 192.168.17.2, port 22 | |||
username local | |||
ask for the password (or look on the course page) |
Latest revision as of 09:40, 24 December 2021
Back to Robobot
Add user
login as pi, password raspberry - password may have changed
Add a user called local, this leaves the pi user as is. This can save reformatting and reinstall when the Pi is to be reused.
add a user called local
sudo adduser local sudo usermod -a --groups adm,cdrom,sudo,audio,video,plugdev,games,users,netdev,input,spi,gpio,i2c,dialout local
switch user to local, and ensure groups are OK, and network is running
su - local groups ifconfig
Note the inet address.
Now it is possible to login (as local) from network.
Get access using hostname
You may change the hostname by changing the name in /etc/hostname. If you do so, then you should restart before the new hostname works.
Now from another PC on the local network
ping hostname.local
Get a console (terminal window) use SSH From linux:
ssh -X local@hostname.local
Or use putty (can be installed in both Linux and Windows - and probably also Apple).
where "hostname" is replaced with the hostname in /etc/hostname.
ask for the password (or look on the course page)
Connecting Raspberry pi to PC using cable
Connect your PC with Robobot using a network cable.
Your PC should receive an IP from the raspberry pi and the raspberry pi on the Robobot should have IP: 192.168.17.2, so logon (from Linux, or using putty):
Linux console command:
ssh local@192.168.17.2
Putty (Windows, Apple or Linux):
use ssh, IP 192.168.17.2, port 22 username local
ask for the password (or look on the course page)