aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2020-03-13 19:34:51 +0000
committerSilvino Silva <silvino@bk.ru>2020-03-13 19:34:51 +0000
commit4216ad7e3cc4d4733034a50c122e4efa4ae08108 (patch)
tree8c92e5912958c4c80dcdbaabe8f356a341123b71
parent5fe66fd40f77166e02806500dabfd9a34c2e7b65 (diff)
downloaddoc-4216ad7e3cc4d4733034a50c122e4efa4ae08108.tar.gz
openssh and core rc.d/wan update
-rwxr-xr-xcore/conf/rc.d/wlan45
-rw-r--r--tools/openssh.html8
2 files changed, 14 insertions, 39 deletions
diff --git a/core/conf/rc.d/wlan b/core/conf/rc.d/wlan
index c9c60ec..9a2f935 100755
--- a/core/conf/rc.d/wlan
+++ b/core/conf/rc.d/wlan
@@ -3,11 +3,8 @@
# /etc/rc.d/wlan: start/stop wireless interface
#
-# Connection type: "DHCP" or "static"
-#TYPE="DHCP"
-TYPE="static"
+DEV=wlp3s0
-DEV=wlp7s0
SSD=/sbin/start-stop-daemon
PROG_DHCP=/sbin/dhcpcd
@@ -18,10 +15,6 @@ PID_WIFI=/var/run/wpa_supplicant.pid
OPTS_DHCP="--waitip -h $(/bin/hostname) -z $DEV"
OPTS_WIFI="-B -P $PID_WIFI -D nl80211,wext -c /etc/wpa_supplicant.conf -i $DEV"
-ADDR=192.168.1.67
-MASK=24
-GW=192.168.1.254
-
print_status() {
$SSD --status --pidfile $2
@@ -35,37 +28,14 @@ print_status() {
case $1 in
start)
-
- if [ "${TYPE}" = "DHCP" ]; then
- $SSD --start --pidfile $PID_WIFI --exec $PROG_WIFI -- $OPTS_WIFI && \
- $SSD --start --pidfile $PID_DHCP --exec $PROG_DHCP -- $OPTS_DHCP
- RETVAL=$?
- else
-
- /sbin/ip link set ${DEV} up
-
- $SSD --start --pidfile $PID_WIFI --exec $PROG_WIFI -- $OPTS_WIFI
-
- RETVAL=$?
-
- /sbin/ip addr add ${ADDR}/${MASK} dev ${DEV} broadcast +
- /sbin/ip route add default via ${GW}
- fi
+ $SSD --start --pidfile $PID_WIFI --exec $PROG_WIFI -- $OPTS_WIFI && \
+ $SSD --start --pidfile $PID_DHCP --exec $PROG_DHCP -- $OPTS_DHCP
+ RETVAL=$?
;;
stop)
-
- if [ "${TYPE}" = "DHCP" ]; then
- ( $SSD --stop --retry 10 --pidfile $PID_DHCP
- $SSD --stop --retry 10 --pidfile $PID_WIFI )
- RETVAL=$?
- else
- $SSD --stop --retry 10 --pidfile $PID_WIFI
- RETVAL=$?
-
- /sbin/ip link set ${DEV} down
- /sbin/ip route del default
- /sbin/ip addr del ${ADDR}/${MASK} dev ${DEV}
- fi
+ ( $SSD --stop --retry 10 --pidfile $PID_DHCP
+ $SSD --stop --retry 10 --pidfile $PID_WIFI )
+ RETVAL=$?
;;
restart)
$0 stop
@@ -83,3 +53,4 @@ esac
exit $RETVAL
# End of file
+
diff --git a/tools/openssh.html b/tools/openssh.html
index c6cf405..c44a934 100644
--- a/tools/openssh.html
+++ b/tools/openssh.html
@@ -211,8 +211,12 @@
<p>Example how to give ssh access to bob user to admin account
using public key authentication. Is necessary to make user public
- key available in the server, this can be done by several ways, in
- this example the public key will be copied using scp;</p>
+ key available in the server, this can be done by several ways;</p>
+ <pre>
+ ssh-copy-id -i ~/.ssh/id_rsa.pub admin@machine.example.org
+ </pre>
+
+ <p>Or doing manually using scp;</p>
<pre>
$ scp /home/bob/.ssh/id_rsa.pub admin@machine.example.org:/home/admin/.ssh/