1

I have two computers with Ubuntu 12.04.4 and 12.04.2. The 12.04.2 is set up to request a password before login on start up.

When the PC is turn on I am able to connected to the 12.04.2 from 12.04.4 using SSH but if the 12.04.2 is restarted I am not able to connect.

I guess this is because the user is not log in yet in 12.04.2.

Is there a way to connect to the PC if it is restarted and the user is not yet log in?

2
  • You have to login somehow to restart the system... also you sure the ssh server is running/installed in both systems?
    – Braiam
    Feb 25, 2014 at 0:41
  • @Braiam It was not running on the second machine as the user was not logged in. I need to start the ssh on reboot using MortelaLCS solution. I have found and other alternatives to do this using crontab with @reboot event.
    – gotqn
    Feb 25, 2014 at 7:05

1 Answer 1

2

your question is not clear for me..

I guess:

1)try to find a place that runs commands on boot up..usually in /etc then just write: (you can add commans at /home/user/.bashrc OR /etc/rc.local)

/etc/init.d/ssh start
/etc/init.d/networking start

I guess:

2)you can add ssh command connection to .bashrc with sshpass command

sshpass -p<password>

This make auto ssh connection for you.

Hope to be helpful for you

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .