WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] SSH server  (Read 19594 times)

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
[SOLVED] SSH server
« on: April 26, 2011, 03:39:38 PM »
Dear all,

     I am new to the forum. My situation is the following. I have a thin client with successfully install the tiny core Linux on it. I have connected to my router and I enjoy opera, and ssh to other machines (college server).

     I would like to get the opportunity to ssh on my pc from another pc (i.e. school's workstation). Which extensions and what other kind of configuration do I need. If this question pre-exists, please send me an URL with the appropriate thread.

Regards,
Evangelos
 8)
« Last Edit: April 29, 2011, 02:03:30 PM by Evangelos »
Evangelos Brachos

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: SSH server
« Reply #1 on: April 26, 2011, 04:08:45 PM »
Both dropbear and opnessh contain both client and server.

For openssh:
You need to edit the config file /usr/local/etc/ssh/sshd_config
Add usr/local/etc/ssh to /opt/.filetool.lst
add the following startup command to /opt/bootlocal.sh:
/usr/local/etc/openssh start

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
Re: SSH server
« Reply #2 on: April 28, 2011, 06:53:38 PM »
OK I did everything and I could connect through ssh to my TCLinux.

But. Everytime I have to do these jobs:

sudo mv /usr/local/etc/ssh/ssh_config.example /usr/local/etc/ssh/ssh_config
sudo mv /usr/local/etc/ssh/sshd_config.example /usr/local/etc/ssh/sshd_config

then get into folder /usr/local/etc/init.d/
to run:
sudo ./openssh start

Is it possible to avoid these three moves everytime I open my pc?
another thing is that I could edit opt/bootsync.sh and opt/bootlocal.sh
with sudo vi ...
and everytime I reboot all the changes lost.

thanks,
Evangelos
Evangelos Brachos

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: SSH server
« Reply #3 on: April 28, 2011, 06:58:26 PM »
Make sure you have a persistent tce directory.
Add the files to /opt/.filetool.lst as I stated previously.
Then run backup.

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
Re: SSH server
« Reply #4 on: April 28, 2011, 07:11:09 PM »
I could not understand why everytime I reboot the files ssh_config sshd_config become ssh_config.example
and sshd_config.example !!!

Everytime I reboot I lose all my changes i.e. .filetool.lst and other changes!!!
Evangelos Brachos

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
Re: SSH server
« Reply #5 on: April 28, 2011, 07:57:16 PM »
In addition, now I found that everytime I reboot I lose all the changes I have done to the files.
Evangelos Brachos

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: SSH server
« Reply #6 on: April 28, 2011, 10:33:44 PM »
You MUST have persistent storage.
If your persistent tce directory is on a USB drive, you need to add a waitusb=10 boot option.
You must backup after making the changes.

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
Re: SSH server
« Reply #7 on: April 29, 2011, 03:59:53 AM »
OK thanks, I didn't know about that. Now all the changes remain. Everything seems to work fine

1) I don't have to start on my own the openssh
2) ssh from other computers succeed.

BUT, (another problem)

During the ssh <user>@<ip> -p 22
it asks me for a password. I gave the user's password but nothing, the problem solved when I type the passwd command to the destination machine!!!

Do you have any idea why when I do passwd then the ssh password is accepted?

Thanks for all!!!
Evangelos Brachos

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: SSH server
« Reply #8 on: April 29, 2011, 11:00:33 AM »
Add the following two lines to /opt/.filetool.lst.

etc/passwd
etc/shadow

Set your passwords and do a backup.
Now your passwords will be saved.

Offline Evangelos

  • Newbie
  • *
  • Posts: 19
Re: SSH server
« Reply #9 on: April 29, 2011, 01:47:56 PM »
OK I appreciate your help everything works!
Evangelos Brachos

Offline stleric

  • Newbie
  • *
  • Posts: 21
Re: SSH server
« Reply #10 on: May 02, 2011, 12:07:56 PM »
Both dropbear and opnessh contain both client and server.

For openssh:
You need to edit the config file /usr/local/etc/ssh/sshd_config
Add usr/local/etc/ssh to /opt/.filetool.lst
add the following startup command to /opt/bootlocal.sh:
/usr/local/etc/openssh start

Not "/usr/local/etc/openssh start", it's "/usr/local/etc/init.d/openssh start"

eric

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: [SOLVED] SSH server
« Reply #11 on: May 02, 2011, 12:10:52 PM »
Right.

Offline stleric

  • Newbie
  • *
  • Posts: 21
Re: SSH server
« Reply #12 on: May 02, 2011, 12:13:04 PM »
Add the following two lines to /opt/.filetool.lst.

etc/passwd
etc/shadow

Set your passwords and do a backup.
Now your passwords will be saved.

Just to clarify, because this screwed me up, it really is "etc/passwd" and "etc/shadow", and not "/etc/passwd" and "/etc/shadow".  The omission of the leading "/" is deliberate and not a typo.  I guess I should have figured it out from the context of the ".filetool.lst" file.