Browse Source

config

master
zeus 3 years ago
parent
commit
d481ac767d
  1. 32
      ssh-tunneling/modules/ROOT/pages/index.adoc
  2. 48
      test-path.sh

32
ssh-tunneling/modules/ROOT/pages/index.adoc

@ -176,6 +176,38 @@ Now try logging into the machine, with "ssh 'username@remoteserver'", and check
~/.ssh/authorized_keys
----
==== SSH Client Config Files
Config file
[source,bash]
----
$HOME/. ssh/config
----
Config template
[source,bash]
----
Host name // <1>
HostName [IP] // <2>
Preferredauthentications publickey
IdentityFile /path2file-key-private // <3>
User user // <4>
Port 22 // <5>
----
<1> name4server
<2> Server ip
<3> path private key
<4> user2connect
<5> port4server
connect example
[source,bash]
----
ssh name
----
== run graphics applications remotely

48
test-path.sh

@ -1,48 +0,0 @@
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
TARGET="$(readlink "$SOURCE")"
if [[ $TARGET == /* ]]; then
SOURCE="$TARGET"
else
DIR="$( dirname "$SOURCE" )"
SOURCE="$DIR/$TARGET" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
fi
done
SRPATH="$( dirname "$SOURCE" )"
SFPATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
if [ "$SFPATH" != "$SRPATH" ]; then
RDIR=$SRPATH # relativ path directory
fi
#echo "full path file $SOURCE"
#echo "full path dir $SFPATH"
#echo "relativ path dir $SRPATH"
check_compose_version() {
composeversion=$(docker-compose version | head -1 | cut -d',' -f1 | cut -d' ' -f3)
version_good=$(echo $composeversion | awk 'BEGIN{ FS="."};
{ if ($1 < 1) { print "N"; }
else if ($1 == 1) {
if ($2 < 26) { print "N"; }
else { print "Y"; }
}
else { print "Y"; }
}')
echo "$version_good"
}
composeversioncheck=$(check_compose_version)
cwdir=$PWD
wdir=$SFPATH
cd $wdir
echo "current working directory,"
echo $cwdir
echo "dir of running program"
echo $wdir
Loading…
Cancel
Save