Topic: set custom session_id

Hello.
Ruby on Rails by default use cookie to store session information. If cookie is empty it generate new session_id. But how I can use my own session_id?

For e.g. I have remote server that ask my for some data. It going in 2 steps. First sending login/password information. and get back session_id iditifier. Second it ask me for required data with sending me session_id he get at first step.
Remote host not supported cookie. How I can tell ruby on rails to use specified session_id, not new generated?