Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 21 Nov 2018, 14:15
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
How to install OpenSSH server in Xenial 7.5?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Author Message
@G@tA

Joined: 05 Apr 2018
Posts: 7

PostPosted: Thu 14 Jun 2018, 18:14    Post subject:  How to install OpenSSH server in Xenial 7.5?  

Hello!

I've been trying to install openssh server on xenial without any success! Day's wasted on that....

Gurus, please provide step by step guide HOW TO SETUP openSSH server on xenialpup.

Thank you!

PS. Searched forums but there is none step by step guide of installation and configuration ... rather than random discussion and suggestions of usage of old packages...
PSS. could you add button for installation of openSSH server to the quickpet menu in the next release?

Thank you in advance!
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Thu 14 Jun 2018, 20:11    Post subject:  

I assume when you type 'ssh' in the terminal there is no response.

So I would look to an app in start menu that controls services or deamons.
It should turn ssh on (assuming it's installed.)
Then when you type ssh in terminal you will get some response.

ssh is often turned off initially because of security.
_________________________________________________________
Back to top
View user's profile Send private message 
@G@tA

Joined: 05 Apr 2018
Posts: 7

PostPosted: Fri 15 Jun 2018, 07:23    Post subject:  

hi don570,

yes there is a response as a a client. I can use ssh -l user@address.com sleep 9000 as an example to connect to my other machine but I need to setup a serer daemon with RSA keys generated etc. As In package manager I've found open ssh server package 7.2 something and installed it.

after that installation if i type in terminal "service ssh start I receive an error message that RSA DSA etc keys are not generated which means service cannot start properly.

What to confiugure and how to generate ... no clue ...
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 867
Location: Connecticut, United States

PostPosted: Fri 15 Jun 2018, 08:19    Post subject:  

I must do some work so I must make this short for now...
look here: https://www.ssh.com/ssh/keygen/
https://gist.github.com/briansmith/2ee42439923d8e65a266994d0f70180b

you only need to generate keys. I will look in later to see how your making out.
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Sat 16 Jun 2018, 14:37    Post subject:  

Quote:
after that installation if i type in terminal "service ssh start I receive an error message that RSA DSA etc keys are not generated which means service cannot start properly.


There is an app that generates the key . I would assume it was installed
when you install openSSH. You can check. It has an obvious name.
_______________________________________

I use ssh only as the root user , since this makes running linux simpler.

I use fatdog linux as my main OS and I often get an error message when trying to start ssh initially,
because the key was generated during another session.
Fortunately the error message in the terminal tells the location of the key
(I believe it's hidden somewhere in /etc)

So I delete this key file and then I start ssh again in the terminal
ssh root@192.168.1.XXX and I will connect automatically to 192.168.1.XXX
(I believe there is a password which is usually woofwoof)
Good luck . That's about all I know about ssh Rolling Eyes
_________________________________________________
_____________________________________________
Back to top
View user's profile Send private message 
@G@tA

Joined: 05 Apr 2018
Posts: 7

PostPosted: Sun 17 Jun 2018, 12:28    Post subject:  

Ok... now I have keys generated... and path of keys is corrected in the sshd_config file...

now when type in terminal:

root#service ssh start
/etc/init.d/ssh: init_is_upstart: command not found
Starting OpenBSD Secure shell server: sshd
root#

What does that mean?
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Mon 18 Jun 2018, 19:30    Post subject:  

Quote:
/etc/init.d/ssh: init_is_upstart: command not found

I looks like your version of linux wasn't set up to start SSH using that command???

However the line
Starting OpenBSD Secure shell server: sshd
is promising.
Simply starting the server should be all that is needed.
A key should be generated automatically.
What does terminal write when you type
ssh root@192.168.1.XXX
where 192.168.1.XXX is known address on network.
_________________________________

Also type 'top' in terminal to spot apps that have been launched.
___________________________________________________
Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 857

PostPosted: Tue 19 Jun 2018, 14:08    Post subject:  

FOLKS: "ssh" is the client. "sshd" is the server. Shocked
Back to top
View user's profile Send private message 
@G@tA

Joined: 05 Apr 2018
Posts: 7

PostPosted: Thu 21 Jun 2018, 04:17    Post subject:  

jafadmin wrote:
FOLKS: "ssh" is the client. "sshd" is the server. Shocked


exactly.... I think links a messed up somehow...
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Thu 21 Jun 2018, 18:36    Post subject:  

I've noticed that dropbear is available . It is clone of SSH.
It is what I use in fatdog linux. It is easy to start and there is no
confusion about who is client and where the server is.
It uses the same command as SSH i.e.
ssh root@192.168.1.XXX

https://launchpad.net/ubuntu/xenial/amd64/dropbear/2016.72-1
____________________________________________________
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2648

PostPosted: Fri 22 Jun 2018, 11:58    Post subject:  

Not sure about Xenial, but under OpenBSD at the end of /etc/ssh/sshd_config I include ...

Code:
Match User user Address 192.168.1.4
        PasswordAuthentication yes
        X11Forwarding yes


So that only userid 'user' from IP 192.168.1.4 can access ssh, requiring they enter the password interactively and it supports X forwarding.

I restart that sshd daemon using /etc/rc.d/sshd -f restart (needs to be restarted after any configuration file changes). For regular startup its set to start in /etc/rc.conf however under Debian/Ubuntu its probably started via a systemD action/command/configuration.

The values higher up in our sshd_config are restrictive i.e. require keys, disallow root and X forwarding ...etc. i.e. is pretty much configured to disallow ssh by anyone else.

Perhaps??? of some use as a possible guide ???

From a cursory glance through https://help.ubuntu.com/community/SSH/OpenSSH/Configuring things look relatively similar for Ubuntu (given how Ubuntu have bricked motherboards in the past after 'upgrades' personally I avoid it like the plague).

I have it set up that way as my main desktop PC (as per attached image) is pretty light, primarily just browser and web server (in OpenBSD the base system comes with X, web server and cwm window manager as part of the core/base system), as part of that we use dynamic dns so we have a static domain name that points to a dynamic (changing) IP value. Data and other binaries such as galculator are on our server, which is behind another router (isolation from browser/web server etc.). So to access data/run other programs ... they run over ssh (binaries/libs on server, X displayed on desktop PC). Using commands similar to

ssh -XC celeron galculator (where celeron is the name matched to the servers IP in /etc/hosts). The XC switch is to enable X-forwarding and uses compression.

To move/copy files I use scp - something like ...

scp somefile.txt user@celeron:/home/user/somefile.txt

Top right in the image shows installed programs (pkg_add and pkg_info are similar to Debians apt-get), in that there is no galculator program installed, the galculator on the desktop is being run off the server via ssh/X forwarding (as outlined above). Same applies to office programs ...etc.

On our main hub/router only http/https is port forwarded to my desktop PC (web pages). The server which sits behind a second router has only ssh port forwarded, so access from externally isn't possible and even from the first layer/router is pretty restricted as per the above.
s600.jpg
 Description   
 Filesize   52.33 KB
 Viewed   255 Time(s)

s600.jpg

Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Sat 23 Jun 2018, 12:25    Post subject:  

I tested 64bit xenial 7.5(frugal install to hard disk) and had no problems connecting with another computer using SSH.

I just made sure that I had the ethernet connection working to router
and then typed in terminal ...

Code:
root# ssh root@192.168.1.104
The authenticity of host '192.168.1.104 (192.168.1.104)' can't be established.
RSA key fingerprint is SHA256:d5pJ+S782ys44Xl67YxIsAPFxQ1qnCXS8sj0JjhqvXw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.104' (RSA) to the list of known hosts.
root@192.168.1.104's password:
root:~# ls
Desktop   my-documents  puppy-reference  Startup
faq.html  network       spot             Tromboon-sample.ogg


I made the connection to my raspberry pi3 board which uses WIFI,
and could use the 'ls' command.
___________________________________________________
Back to top
View user's profile Send private message 
soniabu


Joined: 01 Feb 2018
Posts: 32

PostPosted: Mon 19 Nov 2018, 11:39    Post subject:  

don570 wrote:
I tested 64bit xenial 7.5(frugal install to hard disk) and had no problems connecting with another computer using SSH.
I just made sure that I had the ethernet connection working to router
and then typed in terminal ...
Code:
root# ssh root@192.168.1.104
The authenticity of host '192.168.1.104 (192.168.1.104)' can't be established.
RSA key fingerprint is SHA256:d5pJ+S782ys44Xl67YxIsAPFxQ1qnCXS8sj0JjhqvXw.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.104' (RSA) to the list of known hosts.
root@192.168.1.104's password:
root:~# ls
Desktop   my-documents  puppy-reference  Startup
faq.html  network       spot             Tromboon-sample.ogg

I made the connection to my raspberry pi3 board which uses WIFI,
and could use the 'ls' command.
___________________________________________________


Hi Don,
I have the same operating system, but only in memory. To install openssh I performed these steps:
1) PPM install openssh-clinet and openssh-server (7.2p) and their dependencies. No error.
2) I launch ssh I have this result:
service ssh start
/etc/init.d/ssh: line 37: init_is_upstart: command not found
Starting OpenBSD Secure Shell server: sshd/etc/ssh/sshd_config: No such file or directory
3) it doesn't create me either under etc/ssh/ or under etc/init.d/ the object shhd_config.
Create in etc/ssh/ only two objects: shh_ config and modules.

Do you understand why this is happening_
sonia
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 5183
Location: Ontario

PostPosted: Mon 19 Nov 2018, 14:26    Post subject:  

You shouldn't install SSH. It's there inside the operating system.
Of course it needs to be running. That is done by turning on service.
I'm not sure how xenial does that. Maybe there is start script in /etc???

I don't have an internet connection so I always use the software in the ISO
or the ibiblio repository.

SSH is always in the ISO (or fatdog64 use dropbear clone) so there shouldn't be a difficult install process .

James Bond put dropbear in Raspberry pi3 operating system. I had no problems contacting my raspberry pi3 board
with a simple command in the terminal of fatdog64. Read my experiences.
http://murga-linux.com/puppy/viewtopic.php?p=1000775#1000775

______________________________________________________-
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2648

PostPosted: Mon 19 Nov 2018, 15:47    Post subject:  

To reiterate, the OP is looking to get ssh server (sshd) up and running, not ssh (client).

I'd guess you might need to install openssh-server in Xenial and have at least

PermitRootLogin yes

in /etc/ssh/sshd_config if you intent to ssh into that server as root. Also perhaps use

PasswordAuthentication yes

initially so you can log in as root using a userid (root) and password (beforehand run 'passwd' command as root to enter a password of your choosing for root over that of leaving it at the woofwoof ... or whatever default)

Later when you can log in using userid/password you can flip PasswordAuthentication to no and activate/configure using keys based access.

You'll probably also need to Port Forward port 22 in your router/ISP hub if you want to access your box remotely ... but that's best left turned off/disabled until your setup is relatively tightly configured.

_________________
( ͡° ͜ʖ ͡°) :wq
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0904s ][ Queries: 13 (0.0100s) ][ GZIP on ]