SSH Save Login and Password

Hello, I am wondering about if i can save htb-student@ip and the password somehow
or if i can save ssh session somehow.

I keep getting to retype the login and password all the time.

You save a host with ssh config files. So you could have something like ssh htb that then logs into a configured host with a pre set username. Password is harder, best answer for that ideal is to use an SSH key instead which one is used can also be set in an ssh config file.

However, based on your example I’m thinking this is mostly related to academy targets in which case it won’t really help since address change. SSH pass could be something you could look and write a script but that’s not ideal for most circumstance since it leaves passwords laying around which is kind of counterproductive.

1 Like

ok thanks, But how do i do it then mind typing it how i go about it?

Quick google search. :slightly_smiling_face:

The encrypted passwords and other information such as password expiry information (the password aging information) are stored in /etc/shadow file. All fields are separated by a colon (:slight_smile: symbol. It contains one entry per line for each user listed in /etc/passwd file.