Score:0

Securely handle ssh credentials from web application

in flag

I have a react web application and a nodejs application, both running on one of the shared servers. The servers use LDAP in ssh to identify and authenticate the users. Each user is assigned to one the shared servers, although any user can login to any of the shared servers. From the react application, I currently receive the user's ssh credentials and in the nodejs application I use them to run some scripts on their behalf in their assigned servers. I'm using sshpass to pass in their username and password to run the scripts.

For example:

sshpass -p ${password} ssh ${username}@${server} '/path/to/script'

Is there any other secure way to do this?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.