ssh/scp within vbox.

So finally cracked it.

The basic advantage of using ssh is that you can communicate between computers on the internet in a secure way.

The reason why I had to use this was ,Im building a few stuff for Nexenta, but Nexenta CP 2.0  has no GUI and its obvious that you cannot navigate search and download files as well as you would if you had a decent browser….

Nevertheless,it was not an issue at all.. Here is what one needs to know to set up ssh between 2 machines…(ssh does not know if your using vbox or not,so it will work in most cases… irrespective of vbox)

Step 1:

See if service “ssh:default is online” ?

#svcs -a |grep ssh

If you seen the status only then your good to go, Or else generally enabling nwam will acutally do the trick (as i figured out)

i.e: # svcadm enable nwam  …(This should do it.)

Now, In my case I am running Solaris host, and Nexenta CP 2.0 as guest on Vbox.So details follow accordingly. (From here on I’ll address then as Host and guest)


#ssh-keygen -t dsa (This should only be done once and not every time)

#cd ~/.ssh/;ls (You will see files names as

id_dsa: this is the private key generated by ssh-keygen this is the public key that you will share between systems.

Note: Do this process on both the host and the guest.

Step3: (The most important)

All the configurations are present in a file called sshd_conf, PATH: /etc/ssh/sshd_config

#vim /etc/ssh/sshd_config

Here locate the parameter ‘PermitRootLogin ‘ and set it to ‘yes’ (By default AFAIK its set to no, and that is what most of the times prevents you from ssh’ing to other systems)


Once you’ve changed the settings restart the ssh service on both the machines.

#svcadm restart ssh (On host and on guest)


Fire up the terminal ,

#ssh username@hostname/IP

It will ask you for a password

Enter the password that you had created during the ssh-keygen step.

Thats it.. Your done and logged into the desired machine.

Once this is set up using the scp(Secure Copy Program) you can transfer the files from your host to guest..where ever it may be on the host system.. Cooool 😀

IMPORTANT: during the ssh-keygen step you can actually specify the passphrase as null(Empty) in that case ,go back to /etc/ssh/sshd_config and set PermitEmptyPasswords to ‘yes’  and you can give blank passwords as passphrases.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s