start new:
tmux
start new with session name:
tmux new -s myname
METHOD 1: (with nc in localbox) | |
ssh -D 60002 mohan@10.1.1.20 | |
sftp -o 'ProxyCommand=nc -xlocalhost:60002 %h %p' USER@remotehost.com | |
METHOD 2: (with nc in remote box) | |
sftp -o 'ProxyCommand ssh -q -l mohan 10.1.1.20 nc remotehost.com 22' USER@remotehost.com | |
METHOD 3: (without nc at all) | |
ssh -L 60002:remotehost.com:22 mohan@10.1.1.20 | |
sftp -o Port=60002 USER@localhost |
#!/bin/bash | |
# | |
#puppet bootstrap script | |
# | |
#chkconfig: 2345 99 99 | |
#description: simple bash script to run puppet after reboot | |
#Date: 16/12/2014 | |
#Author:Mohan | |
#Bootstrapping startup process |
#Declare Variables | |
cat > cas <<EOF | |
#CAS TEST CONFIG | |
# Vars starting with APP_ are used to replace contents in skeletons files | |
APP_HTTP_PORT=12385 | |
APP_HTTPS_PORT=12386 | |
APP_AJP_PORT=12387 | |
APP_HTTP_MAX_THREADS=150 |
#If your Kernel is compiled with CONFIG_MAGIC_SYSRQ (sysrq-trigger). | |
#If so, you have the possibility so send binding command. | |
Reset your server (like pressing the hardware RESET button) : | |
# echo b > /proc/sysrq-trigger | |
Sync the hard disks before: | |
# echo s > /proc/sysrq-trigger |
# This is the ProFTPD configuration file | |
# | |
# See: http://www.proftpd.org/docs/directives/linked/by-name.html | |
# Server Config - config used for anything outside a <VirtualHost> or <Global> context | |
# See: http://www.proftpd.org/docs/howto/Vhost.html | |
# Trace logging, disabled by default for performance reasons | |
# (http://www.proftpd.org/docs/howto/Tracing.html) |
##SSHAGENT PPID TRICK for DESKTOP | |
#source ~/.ssh-agent.sh in your .bashrc | |
SSHAGENTPPID=$(ps -eo ppid,comm|awk '/ssh-agent/ {print $1}') | |
if [ -n "$SSHAGENTPPID" ] | |
then | |
export SSH_AUTH_SOCK=`ls /tmp/ssh*/agent.$SSHAGENTPPID` | |
export SSH_AGENT_PID=`pgrep -P $SSHAGENTPPID ssh-agent` | |
echo "SSH agent pid $SSH_AGENT_PID"; |
#Turn your browser into notepad | |
data:text/html, <html contenteditable> |
#RMP Top Folder Permissions | |
<Directory /sftp/home/rmp_inbound/> | |
#Default Deny all | |
<Limit ALL> | |
DenyAll | |
</Limit> | |
# Allow Full Access - RMP internal group | |
<Limit CWD WRITE STAT LSTAT DIRS READ> |
[root@server02 scripts]# cat rmp-logsplit.sh | |
#!/bin/bash | |
#Date:08/01/2015 | |
#Purpose:Provide Everyday the previous day Transfer logs for RMP as logrotate runs weekly | |
#Daily logs are available under location /sftp/home/rmp_inbound/Logs/sftp-xfer-201x-xx-xx.log | |
#place the log under /opt/scripts/ and run under cron for logs | |
#Author: Mohan | |
#Yesterdays date for logfile as cron is run the following day | |
#Output: "2014-01-08" |