Now that you are connected to your Pi via SSH, you can move on to installing the latest stable version of node.js. Thanks to the node-arm project and Adafruit's Raspberry Pi Package Repository, installing the latest version of node.js on a Raspberry Pi is very simple.
The first step will be to add the apt.adafruit.com package repository to your Pi's /etc/apt/sources.list file. You can do this by running the following command.
curl -sLS https://apt.adafruit.com/add | sudo bash