SSH Password

How to store a string in a Secure String…

Im passing password as a string how to proceed further…

@Manoj_Kumar5

Do you want to convert String to Secure String right.

If yes then please try below expression.

  SecureString secure_str = new NetworkCredential(String.Empty, “yourPasswordString”).SecurePassword
1 Like

Hi @Manoj_Kumar5

Just change variable type as a securestring

If you find it useful mark it as solution and close the thread.

Regards,
Gulshiyaa

give look to this issue …

End of expression expected

i cant able to covert the string to secure string.

dude there its self its clear you just pass the string " " it will automaticaly change its variable as secure string

you just keep your password in double quotation

@Manoj_Kumar5

You have to write above expression in Assign activity.

Create one Secure String variable and named as secure_str and assign that expression right hand side part and then pass into that password field.

Please find the below attached thread to know more about this.

1 Like

even I put the double codes

yeah yeah am also checking with it its getting error

@Manoj_Kumar5 @gulshiyaa

You are writing entire expression here and that’s why you people are getting this error.

Mention like this.

  new NetworkCredential(String.Empty, “yourPasswordString”).SecurePassword
1 Like

use this

“Yourpasswordstring” = place your password in string""

If you find it useful mark it as solution and close the thread.

Regards,
Gulshiyaa

See the screenshot and write

use this
new NetworkCredential(String.Empty, “yourPasswordString”).SecurePassword

see this

image

keep it in string

and what is that secured password,if it is a variable keep the variable type as string

image

@Manoj_Kumar5

Could you please go to that exclamation mark and help me with screenshot of that error. So that I can check and help you.

Thank you @lakshman…i say the attached Xaml file… Hope it is clear that before changing a secure string to a String is clearly seen in the solution.

1 Like

Thanks @atevis for sharing the solution it is easily made to understand… one thing i want to get clear is this a standard method in UiPath to declare the secure string to a string.

Glad to help you @Manoj_Kumar5

Thanks @gulshiyaa For your warm Support. Thank you very much.

1 Like