Portfolio CLI
- 3 Devlogs
- 2 Total hours
Everyone makes their portfolio, on a website. Why not show my Node.JS and try out ssh2 to make my own SSH server which shows my portfolio in the CLI
Everyone makes their portfolio, on a website. Why not show my Node.JS and try out ssh2 to make my own SSH server which shows my portfolio in the CLI
So i finally deployed it,
IT had alot of errors, but i finally managed to deploy it on nest server, It was pretty much easy but some port stuff gave me headache,
Also i had to change the code from the standard 0.0.0.0 to :: because nest only has IPv6 and not IPv4.
Also i added the demo instructions in the README
Well it is for sure that no one wants to read some boring stuff, so i decided to make sure that my content is kinda interesting, although my projects might not be. So I have added some cool stuff like a little bit of coloring , a banner image and a username kinda handler which will let me fetch your username so that when you do
ssh yourname@ip-of-my-portfolio -p 2222
i can fetch the yourname part which will make it very cool! I believe
So i planned that i will be making a kind of portfolio where you could ssh into. I got this idea from zrl’s sshtron game which is very fun and is a ssh based snake game.
So i just started learning about how ssh2 works and how to make a server using it.
The documentation was kind of very complex for me, so i saw the examples.
I created a module called ‘ready.js’ , which would handle everything after the client was authenticated.
I had some PTY errors, so i figured out if i accept everything, there will be no errors. So i just added pty.accept() for all cases no matter what.
I did the same for authentication which allowed me to login without any password or username.
To test it finally worked, i tried to send a raw ’Welcome!” stream.
So far looks good