Salesforce/ Apex : using apex connect from salesforce to another other salesforce instance and get session id

Using Apex If you can to connect from one salesforce to another salesforce instance then following is the code. / how-to-connect-salesforce-to-salesforcepublic with sharing class SalesforceApexConnectsToAnotherSalesforce {