Ubuntu: How to run openssh-server compiled from source



Question:

I have compiled openssh source using ./configure make and make install

Now it has compiled and installed binaries, config files and the server at

/usr/local/bin  /usr/local/etc  /usr/local/sbin  

what's next?. How do I start the ssh server and start connecting to it?


Solution:1

My preferred way to us a locally built version of a standard package is to apt-get source the Ubuntu version of the package, update the source and build a .deb from there and install that. This helps you to get all init scripts and configurations in line with the rest of your system.


Solution:2

see if you can do sudo service ssh start, if it does and you want it to run on startup you can also do sudo update-rc.d ssh defaults to always run it on startup.

then from another machine (linux/mac) try ssh username@machine-ip. On windows you can use putty providing machine ip.


Solution:3

I guess, you must have found the answer by now. but if not then -

# /usr/local/sbin/sshd  

this will start the openssh server with default settings. but in few cases it will show an error-

privilege separation user sshd does not exist  

To resolve this edit your sshd_config file and change this to UsePrivilegeSeparation no and save. now start it again as /usr/local/sbin/sshd.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »