PDA

View Full Version : [ubuntu] Setting up sshd



terminator14
May 8th, 2008, 05:45 AM
I'm a bit new here so I'm not sure if this is the right category for my post, but here's my problem:

I'm running Ubuntu 8.04 and just installed OpenSSH from the main website (OpenSSH 5.0p1) - the portable one. I'm pretty sure that installs both ssh-client and ssh-server. After compiling and installing the package, when I run


sshd

I get


sshd re-exec requires execution with an absolute path

I did a little digging online and found that the solution is rather simple, but the paths that they use do not seem to match mine.

Here an example of a forum post with the solution:

http://www.linuxforums.org/forum/yoper-linux-help/12716-ssh-problems.html


cat /etc/init.d/template |sed 's/PROGRAM/\/usr\/sbin\/sshd/g' >/etc/init.d/sshd

but all I get when I run this is:


cat: /etc/init.d/template: No such file or directory

How do I find what directory is the right one, and where in that code do I write that in?

StOoZ
May 8th, 2008, 05:50 AM
I used to do it with this guide:
https://help.ubuntu.com/community/AdvancedOpenSSH

terminator14
May 9th, 2008, 12:36 AM
I used to do it with this guide:
https://help.ubuntu.com/community/AdvancedOpenSSH

I was looking for a good OpenSSH guide, thanks.

Vivaldi Gloria
May 10th, 2008, 01:10 PM
sshd re-exec requires execution with an absolute path

means that instead of


sshd

you should write


/usr/sbin/sshd

At least that is where sshd is in my Gutsy & Hardy computers. But I installed it using synaptic and I don't know if it makes a difference.

DBrocks
May 10th, 2008, 01:22 PM
install using "apt-get"


apt-get install openssh-server
Then it should run automatically.

Johnsie
May 10th, 2008, 01:38 PM
AS drbocks said, you can do apt-get install to get it. On the server computer you should do:


sudo apt-get install openssh-server

Once it's installed on the server you go onto the client computer and do:

Install the client:

sudo apt-get install openssh-client


To Connect to your server:


ssh 192.168.1.110
(where 192.168.1.110 is the ip of your server)
or


ssh steve@192.168.1.110

where the ip address of the machine you want to connect to is 192.168.1.110 and the username you want to access on that machine is steve.

It's very easy and quite handy sometimes. Right now I'm actually using it to upgrade my server to Hardy Heron.


If you're using Windows on your client you can connect by using a program called Putty or with the Windows version of Openssh client.

DBrocks
May 10th, 2008, 01:38 PM
and also do

apt-get install openssh-client

Vivaldi Gloria
May 10th, 2008, 02:00 PM
install using "apt-get"


apt-get install openssh-server
Then it should run automatically.

I installed openssh-server using the synaptic and sshd doesn't start unless I start it by


/usr/sbin/sshd

Is there a way to start it automatically?

Johnsie
May 10th, 2008, 02:02 PM
hmmm thats starge that it doesn start automatically on boot... I'm looking for how I have gotstuuf to run at boot time and should be able to give you an answer in a few minutes.

DBrocks
May 10th, 2008, 02:05 PM
you mean on boot?

Johnsie
May 10th, 2008, 02:07 PM
ok... Try this:



sudo nano /etc/rc.local

end then add this to the bottom:


cd /usr/sbin &
./sshd &
exit 0

Hopefully this should make it autostart at boot time. Let me know if it works for you

Vivaldi Gloria
May 10th, 2008, 02:09 PM
you mean on boot?

Yes. Everytime i boot my computer I have to start sshd manually.

Vivaldi Gloria
May 10th, 2008, 02:23 PM
Try this (...) Hopefully this should make it autostart at boot time. Let me know if it works for you

Johnsie, It worked! Thanks a lot.

Johnsie
May 10th, 2008, 02:26 PM
You're welcome. Have fun :-)

terminator14
May 16th, 2008, 05:32 AM
Thanks for all your responses guys and sorry I haven't been replying to the help on my own thread but I have recently had tons of homework and haven't been able to have fun with my linux box at all.
Anyway:


install using "apt-get"


apt-get install openssh-server
Then it should run automatically.

I tried that, and it did work, running sshd without problems it would seem, but the only thing I wasn't happy about was that it seemed to be the old version of ssh. I thought it might have security holes or something that were fixed in the new one so I compiled the new one after downloading it from the site and couldn't get it to run. I guess for now I'll just use the old version until I get a break from homework to look into the matter again, but since there's only a month left before the end of the school year, and the finals are coming up, I don't think that will be anytime soon. Thank for your help anyway guys.

UBUNTU RULES!!!