Ficut,
The following command will set the values for each preference:
si setprefs --save --command=connect server.hostname=<hostname> server.port=<portnumber> server.user=<userid> server.credential=<userpassword>
The next cmd will set the client so that it never asks you again for the already stored information:
si setprefs --save --command=connect --ask --ui=cli server.user=never server.hostname=never server.port=never server.credential=never
In place of 'never' other options are 'always' and 'prompt'.