cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mattyj207
Visitor
Visitor
3,815 Views
Registered: ‎10-06-2015

Configuring dropbear with a banner in Petalinux 2017.1

Jump to solution

I'm trying to add a dropbear default banner to my ssh logins, but I'm not sure how/what I need to configure in petalinux to do this.

 

I tried setting up a ssh banner manually by modifying the file /etc/issue.net and then running the following command:

 

dropbear -b '/etc/issue.net' (with and without quotes on the filepath)

 

Then I tried to ssh into the board but my message was not displayed.

 

Any ideas?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
rfs613
Scholar
Scholar
4,579 Views
Registered: ‎05-28-2013

Instead of starting dropbear manually (2nd line)... you should edit the init script (/etc/init.d/dropbear) so that it supplies the "-b /etc/issue.net" argument. This can be either added directly, or put in a config file (/etc/default/dropbear) that is read by the init script.

View solution in original post

0 Kudos
4 Replies
rfs613
Scholar
Scholar
3,784 Views
Registered: ‎05-28-2013
This worked as expected for me, the banner is displayed prior to the login prompt.

When you ran "dropbear -b /etc/issue.net" did you first stop any existing dropbear server? And I presume you started it as root of course?
mattyj207
Visitor
Visitor
3,777 Views
Registered: ‎10-06-2015

Thanks! I had done a restart, but not a stop and then start.

 

This is what worked for me:

 

/etc/init.d/dropbear stop

dropbear -b /etc/issue.net

/etc/init.d/dropbear start

 

Any ideas on how to configure dropbear with the banner on boot without having to run these commands?

0 Kudos
rfs613
Scholar
Scholar
4,580 Views
Registered: ‎05-28-2013

Instead of starting dropbear manually (2nd line)... you should edit the init script (/etc/init.d/dropbear) so that it supplies the "-b /etc/issue.net" argument. This can be either added directly, or put in a config file (/etc/default/dropbear) that is read by the init script.

View solution in original post

0 Kudos
mattyj207
Visitor
Visitor
3,762 Views
Registered: ‎10-06-2015

That works!

 

I edited /etc/default/dropbear and added the line

 

DROPBEAR_BANNER=/etc/issue.net

 

Thanks again.

0 Kudos