Since we are gonna keep our pi headless. That means we are gonna do everything using SSH (via putty). But every time you open a new session in putty, you have to enter the username & password. This could be annoying for anyone who frequently needs to login and logout into pi. But there is a way to save username and password in putty permanently so that you don’t have to enter your credentials each time you open a session. Following are the steps to achieve this:
- right click on your putty.exe ->send to -> Desktop(create shortcut).
- Now go to desktop, right click on the shortcut you just created and choose properties. In properties window go to Target text box. The target box contains the location of putty.exe. It will be something like <some_directory>/putty.exe . Just put a space after <some_directory>/putty.exe. and then type in
<username>@<ip address of Pi><space>-pw<space><password>.
For example if you have putty.exe in D:\ImpSoft directory, ip address of pi is 192.168.1.5 and username & password of your pi is pi & raspberry then Target box should look like
D:\ImpSoft\putty.exe pi@192.168.1.5 -pw raspberry
- Hit ok and you are done. Now open the putty via this shortcut. It will directly take you to pi console. Neither you have to enter your ip each time in putty nor you have to enter username and password each time.