Could someone please explain what the following code does...
Code:
chown -R example_user:example_user .ssh chmod 700 .ssh chmod 600 .ssh/authorized_keys
Thanks,
Rob
chown -R example_user:example_user .ssh chmod 700 .ssh chmod 600 .ssh/authorized_keys
sudo ./file.sh
./file.sh
sudo chmod 777 ./file.sh
chmod 777
sudo chmod 777
ls -ld /dir drwxrwxrwx. 2 root root 4096 Jan 8 00:06 dir chmod 2777 /dir [this sets the setgid bit on] ls -ld /dir drwxrwsrwx. 2 root root 4096 Jan 8 00:06 /dir
chmod 4777 /dir [for setting setuid bit on] drwsrwsrwx. 2 root root 4096 Jan 8 00:06 /dir
chmod -s /dir
chmod 4777 /dir drwsrwxrwx. 2 root root 4096 Jan 8 00:06 /dir
HP-UX server1 B.11.11 U 9000/800
CentOS release 6.3 (Final)
ssh-keygen -t rsa copy the ~/.ssh/id_rsa.pub from client machine to ~/.ssh/authorized_keys on server machine
mount -t vfat /dev/mmcblk0p1 /mnt/SD
id_ecdsa miati:miati-600 id_ecdsa.pub miati:miati-644 id_rsa miati:miati-600 id_rsa.pub miati:miati-644 /home/miati/.ssh/ miati:miati-700
$ ssh-add id_rsa Enter passphrase for id_rsa: Identity added: id_rsa (id_rsa) $ ssh-add id_ecdsa Enter passphrase for id_ecdsa: Error reading response length from authentication socket. Could not add identity: id_ecdsa
ssh-keygen -t rsa -b 4096 ssh-keygen -t ecdsa
if grep -c -i Y $INIFILE > /dev/null
cat /dev/null > $DATA_DIR/$DATAFILE
systemctl start snmpd.service
pgrep snmpd 4233
kill -3 4233 > /tmp/snmp_pid.txt
kill -SIGQUIT 4233 > /tmp/snmp_pid.txt
root@Fileserver:~# rsync -av --delete /shared/fileshare/ /backup/backup building file list ... done created directory /backup/backup ./ manager/ manager/chironfs.txt manager/cronman.txt manager/curlftpfs.txt manager/curlman.txt manager/getnetaddress.txt manager/grepman.txt manager/rsyncman.txt manager/tarman.txt public/ user1/ user10/ user2/ user3/ user4/ user5/ user6/ user7/ user8/ user9/ rsync: chown "/backup/backup/manager/.chironfs.txt.c6MbJ7" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.cronman.txt.hdBG4P" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.curlftpfs.txt.t1sG4L" failed: Operation no t permitted (1) rsync: chown "/backup/backup/manager/.curlman.txt.6oWPoW" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.getnetaddress.txt.V8z8Kk" failed: Operatio n not permitted (1) rsync: chown "/backup/backup/manager/.grepman.txt.REh4WW" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.rsyncman.txt.ho8VNM" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.tarman.txt.BkcmeS" failed: Operation not p ermitted (1) sent 211115 bytes received 274 bytes 6710.76 bytes/sec total size is 210263 speedup is 0.99 rsync error: some files could not be transferred (code 23) at main.c(977) [sende r=2.6.9] root@Fileserver:~#
root@Fileserver:~# rsync -av --no-p --delete /shared/fileshare/ /backup/backup building file list ... done ./ manager/ manager/chironfs.txt manager/cronman.txt manager/curlftpfs.txt manager/curlman.txt manager/getnetaddress.txt manager/grepman.txt manager/rsyncman.txt manager/tarman.txt public/ user1/ user10/ user2/ user3/ user4/ user5/ user6/ user7/ user8/ user9/ rsync: chown "/backup/backup/manager/.chironfs.txt.6Q3eP2" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.cronman.txt.FC8Orx" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.curlftpfs.txt.mlVSN9" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.curlman.txt.vlJ4b1" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.getnetaddress.txt.LXmft0" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.grepman.txt.SVuaye" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.rsyncman.txt.KTNYqA" failed: Operation not permitted (1) rsync: chown "/backup/backup/manager/.tarman.txt.zcU90c" failed: Operation not permitted (1) sent 211115 bytes received 274 bytes 7686.87 bytes/sec total size is 210263 speedup is 0.99 rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]