Beranda > Documents > Remote SHH => Om Dora

Remote SHH => Om Dora

#!/bin/bash
clear
select fname in “warnet1” “warnet2” “warnet3” “Localnet”;
do
case $REPLY in
1) echo “Remote SSH”
read -p “username: ” user;
read -p “port: ” port;
ssh -l $user 11x.13x.12x.xx –port $port
break

;;
2) echo “Remote SSH”
read -p “username: ” user;
read -p “port: ” port;
ssh -l $user 11*.1**.12*.** –port $port
break
;;
3) echo “Remote SSH”
read -p “username: ” user;
read -p “port: ” port;
ssh -l $user 11*.137.12*.** –port $port
break
;;
4) echo “Remote SSH”
read -p “username: ” user;
read -p “port: ” port;
ssh -l $user 1**.1**.1.2** –port $port
break
;;
esac
done
Simpan dengan nama remote-ssh
++++++++++++++++++++++++++++++++++++++++++++++
root@dora-gantenk:~ # ssh root@www ‘df -h’
Filesystem Size Used Avail Use% Mounted on
/dev/ubda 3.5G 2.1G 1.4G 61% /
tmpfs 96M 4.0K 96M 1% /dev/shm
++++++++++++++++++++++++++++++++++++++++++++++
#!/bin/sh
# Simple rsync “driver” script.  (Uses SSH as the transport layer.)
# Demonstrates how to use rsync to back up a directory tree from a local
# machine to a remote machine.  Then re-run the script, as needed, to keep
# the two machines “in sync.”  It only copies new or changed files and ignores
# identical files.
# Destination host machine name
DEST=”smpent”
# User that rsync will connect as
# Are you sure that you want to run as root, though?
USER=”root”
# Directory to copy from on the source machine.
BACKDIR=”/root/bin/”
# Directory to copy to on the destination machine.
DESTDIR=”/root/bin/”
# excludes file – Contains wildcard patterns of files to exclude.
# i.e., *~, *.bak, etc.  One “pattern” per line.
+++++++++++++++++++++++++++++++++++++++++++++++++++

#!/bin/bashclearselect fname in “warnet1” “warnet2” “warnet3” “Localnet”;docase $REPLY in1) echo “Remote SSH”read -p “username: ” user;read -p “port: ” port;ssh -l $user 11x.13x.12x.xx –port $portbreak;;2) echo “Remote SSH”read -p “username: ” user;read -p “port: ” port;ssh -l $user 11x.137.12x.xx –port $portbreak;;3) echo “Remote SSH”read -p “username: ” user;read -p “port: ” port;ssh -l $user 11x.137.12x.xx –port $portbreak;;4) echo “Remote SSH”read -p “username: ” user;read -p “port: ” port;ssh -l $user 192.168.1.254 –port $portbreak;;esacdoneSimpan dengan nama remote-ssh
++++++++++++++++++++++++++++++++++++++++++++++
root@dora-gantenk:~ # ssh root@www ‘df -h’Filesystem Size Used Avail Use% Mounted on/dev/ubda 3.5G 2.1G 1.4G 61% /tmpfs 96M 4.0K 96M 1% /dev/shm
++++++++++++++++++++++++++++++++++++++++++++++
#!/bin/sh
# Simple rsync “driver” script.  (Uses SSH as the transport layer.)# http://www.scrounge.org/linux/rsync.html
# Demonstrates how to use rsync to back up a directory tree from a local# machine to a remote machine.  Then re-run the script, as needed, to keep# the two machines “in sync.”  It only copies new or changed files and ignores# identical files.
# Destination host machine nameDEST=”smpent”
# User that rsync will connect as# Are you sure that you want to run as root, though?USER=”root”
# Directory to copy from on the source machine.BACKDIR=”/root/bin/”
# Directory to copy to on the destination machine.DESTDIR=”/root/bin/”
# excludes file – Contains wildcard patterns of files to exclude.# i.e., *~, *.bak, etc.  One “pattern” per line.
+++++++++++++++++++++++++++++++++++++++++++++++++++

Kategori:Documents
  1. Belum ada komentar.
  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: