Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/03/11 in all areas

  1. Daca nu ai pus timer-ul acela, normal ca le viziteaza asa repede. Predefinit nu are delay intre schimbarea proxy-urilor.
    1 point
  2. Vezi pe pagina asta, poate iti surade ceva 8 Best Massively Multiplayer Online Role-playing Games (MMORPG) for Linux | TechSource
    1 point
  3. 25 Best SSH Commands / Tricks OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions. SSH is an awesome powerful tool, there are unlimited possibility when it comes to SSH. 1) Copy ssh keys to user@host to enable password-less ssh logins. ssh-copy-id user@host To generate the keys use the command ssh-keygen 2) Start a tunnel from some machine’s port 80 to your local post 2001 ssh -N -L2001:localhost:80 somemachine Now you can acces the website by going to http://localhost:2001/ 3) Output your microphone to a remote computer’s speaker dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp This will output the sound from your microphone port to the ssh target computer’s speaker port. The sound quality is very bad, so you will hear a lot of hissing. 4) Compare a remote file with a local file ssh user@host cat /path/to/remotefile | diff /path/to/localfile - Useful for checking if there are differences between local and remote files. 5) Mount folder/filesystem through SSH sshfs name@server:/path/to/folder /path/to/mount/point Install SSHFS from SSH Filesystem Will allow you to mount a folder security over a network. 6) SSH connection through host in the middle ssh -t reachable_host ssh unreachable_host Unreachable_host is unavailable from local network, but it’s available from reachable_host’s network. This command creates a connection to unreachable_host through “hidden” connection to reachable_host. 7) Copy from host1 to host2, through your host ssh root@host1 “cd /somedir/tocopy/ && tar -cf – .” | ssh root@host2 “cd /samedir/tocopyto/ && tar -xf -” Good if only you have access to host1 and host2, but they have no access to your host (so ncat won’t work) and they have no direct access to each other. 8) Run any GUI program remotely ssh -fX <user>@<host> <program> The SSH server configuration requires: X11Forwarding yes # this is default in Debian And it’s convenient too: Compression delayed 9) Create a persistent connection to a machine ssh -MNf <user>@<host> Create a persistent SSH connection to the host in the background. Combine this with settings in your ~/.ssh/config: Host host ControlPath ~/.ssh/master-%r@%h:%p ControlMaster no All the SSH connections to the machine will then go through the persisten SSH socket. This is very useful if you are using SSH to synchronize files (using rsync/sftp/cvs/svn) on a regular basis because it won’t create a new socket each time to open an ssh connection. 10) Attach screen over ssh ssh -t remote_host screen -r Directly attach a remote screen session (saves a useless parent bash process) 11) Port Knocking! knock <host> 3000 4000 5000 && ssh -p <port> user@host && knock <host> 5000 4000 3000 Knock on ports to open a port to a service (ssh for example) and knock again to close the port. You have to install knockd. See example config file below. [options] logfile = /var/log/knockd.log [openSSH] sequence = 3000,4000,5000 seq_timeout = 5 command = /sbin/iptables -A INPUT -i eth0 -s %IP% -p tcp –dport 22 -j ACCEPT tcpflags = syn [closeSSH] sequence = 5000,4000,3000 seq_timeout = 5 command = /sbin/iptables -D INPUT -i eth0 -s %IP% -p tcp –dport 22 -j ACCEPT tcpflags = syn 12) Remove a line in a text file. Useful to fix ssh-keygen -R <the_offending_host> In this case it’s better do to use the dedicated tool 13) Run complex remote shell cmds over ssh, without escaping quotes ssh host -l user $(<cmd.txt) Much simpler method. More portable version: ssh host -l user “`cat cmd.txt`” 14) Copy a MySQL Database to a new Server via SSH with one command mysqldump –add-drop-table –extended-insert –force –log-error=error.log -uUSER -pPASS OLD_DB_NAME | ssh -C user@newhost “mysql -uUSER -pPASS NEW_DB_NAME” Dumps a MySQL database over a compressed SSH tunnel and uses it as input to mysql – i think that is the fastest and best way to migrate a DB to a new server! 15) Remove a line in a text file. Useful to fix “ssh host key change” warnings sed -i 8d ~/.ssh/known_hosts 16) Copy your ssh public key to a server from a machine that doesn’t have ssh-copy-id cat ~/.ssh/id_rsa.pub | ssh user@machine “mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys” If you use Mac OS X or some other *nix variant that doesn’t come with ssh-copy-id, this one-liner will allow you to add your public key to a remote machine so you can subsequently ssh to that machine without a password. 17) Live ssh network throughput test yes | pv | ssh $host “cat > /dev/null” connects to host via ssh and displays the live transfer speed, directing all transferred data to /dev/null needs pv installed Debian: ‘apt-get install pv’ Fedora: ‘yum install pv’ (may need the ‘extras’ repository enabled) 18) How to establish a remote Gnu screen session that you can re-connect to ssh -t user@some.domain.com /usr/bin/screen -xRR Long before tabbed terminals existed, people have been using Gnu screen to open many shells in a single text terminal. Combined with ssh, it gives you the ability to have many open shells with a single remote connection using the above options. If you detach with “Ctrl-a d” or if the ssh session is accidentally terminated, all processes running in your remote shells remain undisturbed, ready for you to reconnect. Other useful screen commands are “Ctrl-a c” (open new shell) and “Ctrl-a a” (alternate between shells). Read this quick reference for more screen commands: GNU screen [quick_reference] 19) Resume scp of a big file rsync –partial –progress –rsh=ssh $file_source $user@$host:$destination_file It can resume a failed secure copy ( usefull when you transfer big files like db dumps through vpn ) using rsync. It requires rsync installed in both hosts. rsync –partial –progress –rsh=ssh $file_source $user@$host:$destination_file local -> remote or rsync –partial –progress –rsh=ssh $user@$host:$remote_file $destination_file remote -> local 20) Analyze traffic remotely over ssh w/ wireshark ssh root@server.com ‘tshark -f “port !22? -w -’ | wireshark -k -i - This captures traffic on a remote machine with tshark, sends the raw pcap data over the ssh link, and displays it in wireshark. Hitting ctrl+C will stop the capture and unfortunately close your wireshark window. This can be worked-around by passing -c # to tshark to only capture a certain # of packets, or redirecting the data through a named pipe rather than piping directly from ssh to wireshark. I recommend filtering as much as you can in the tshark command to conserve bandwidth. tshark can be replaced with tcpdump thusly: ssh root@example.com tcpdump -w – ‘port !22? | wireshark -k -i - 21) Have an ssh session open forever autossh -M50000 -t server.example.com ‘screen -raAd mysession’ Open a ssh session opened forever, great on laptops losing Internet connectivity when switching WIFI spots. 22) Harder, Faster, Stronger SSH clients ssh -4 -C -c blowfish-cbc We force IPv4, compress the stream, specify the cypher stream to be Blowfish. I suppose you could use aes256-ctr as well for cypher spec. I’m of course leaving out things like master control sessions and such as that may not be available on your shell although that would speed things up as well. 23) Throttle bandwidth with cstream tar -cj /backup | cstream -t 777k | ssh host ‘tar -xj -C /backup’ this bzips a folder and transfers it over the network to “host” at 777k bit/s. cstream can do a lot more, have a look cstream - a general-purpose streaming tool for example: echo w00t, i’m 733+ | cstream -b1 -t2 24) Transfer SSH public key to another machine in one step ssh-keygen; ssh-copy-id user@host; ssh user@host This command sequence allows simple setup of (gasp!) password-less SSH logins. Be careful, as if you already have an SSH keypair in your ~/.ssh directory on the local machine, there is a possibility ssh-keygen may overwrite them. ssh-copy-id copies the public key to the remote host and appends it to the remote account’s ~/.ssh/authorized_keys file. When trying ssh, if you used no passphrase for your key, the remote shell appears soon after invoking ssh user@host. 25) Copy stdin to your X11 buffer ssh user@host cat /path/to/some/file | xclip Have you ever had to scp a file to your work machine in order to copy its contents to a mail? xclip can help you with that. It copies its stdin to the X11 buffer, so all you have to do is middle-click to paste the content of that looong file Have Fun Sursa: 25 Best SSH Commands / Tricks
    -1 points
  4. În principal folosit în domeniul bijuteriilor, aurul (simbol chimic Au) este de asemenea, folosit în produc?ie (de industria electronic?, în special la calculatoare) datorit? conductibit??ilor electrice ?i termice excelente, rezisten?a la oxidare ?i a inalterabilit??ii. Industria de calculatoare utilizeaz? anual peste 300 de tone de metal pre?ios. Aurul se g?se?te în aproape toate componentele calculatorului – procesoare, pl?ci de baza, pl?ci video, pl?cu?e de memorie, ?i asa mai departe. Desigur, cantit??ile utilizate pentru fiecare pies? în parte sunt infinitezimale. Dar cum pre?ul aurului a crescut vertiginos în ultimii ani, este tot mai rentabil din punct de vedere economic s? recuperezi aurul din calculatoare ?i componentele electronice vechi decât s? îl minezi. Tocmai din acest motiv companiile specializate au început s? fac? asta. Aurul se g?se?te în numeroase locuri pe o placa de baza: conectori, slotul PCI Express, sloturile PCI, AGP ?i alte porturi, jumperi, socket-ul procesorului ?i sloturile pentru pl?cutele de memorie. În acest articol o s? i?i ar?t cum se poate recupera aurul de pl?cile de baz? vechi.Te rog sa re?ii c? aceste produse chimice utilizate în aceast? demonstra?ie sunt foarte periculoase, mai ales în concentra?iile utilizate. Prin urmare, sus?in cu t?rie c? nu trebuie s? reproduci acest experiment la domiciliu. To?i ace?ti conectori sunt adesea acoperi?i cu un strat fin de aur cu o grosime de câ?iva microni, depus prin metoda plac?rii. Instrumente necesare În prima etapa a acestui experiment, trebuie s? recuperezi to?i ace?ti pini ?i conectori. Avem nevoie de un cle?te t?ietor, patent, ?urubelni?? plat? ?i putina vaselina. Pini, pini ?i multi pini… Ai nevoie de o gr?mad? mare de pini ca s? efectuezi acest experiment… … Împreuna cu unele echipamente ?i produse chimice. Electroliza Pentru a recupera câteva miligrame de aur depus pe pini, se va folosi o celul? electrolitic?. Baia de electroliz? const? dintr-o solu?ie de acid sulfuric cu concentra?ie de 95%. Catodul va fi din plumb iar anodul din cupru. Pinii sunt plasa?i în anodul de cupru, care are forma de co?. Cum func?ioneaz? electroliza: Folosind un înc?rc?tor obi?nuit, prin trecerea unui curent electric prin celula electrolitic?, cuprul din anod (?i din pini) se dizolva ?i se depune pe catodul din plumb. Aurul, desprins de cupru, formeaz? un sediment în partea de jos a celulei. De asemenea, trebuie s? re?ine?i c? temperatura din baie creste semnificativ în timpul procesului de electroliz?. Recuperarea depozitului Dup? ce tot aurul a fost desprins de pe pini, putem s? l?s?m baia electrolitic? s? se decanteze. Apoi, vom recupera cât mai mult din acidul sulfuric, dup? care dilu?m ceea ce r?mâne în partea de jos a celulei electrolitice. Diluarea Când vrei s? diluezi acid sulfuric, fii atent s? torni întotdeauna acid sulfuric în ap?, ?i nu invers. Dac? faci invers, primele pic?turi care ating suprafa?a acidului sulfuric vor fi vaporizate instantaneu, ?i ar putea cauza stropi de acid. Filtrarea Avem acum o solu?ie diluat? de acid sulfuric, diferite metale (inclusiv aur) ?i de?eurile care urmeaz? s? le filtr?m. Nu se filtreaz? solu?ia direct, f?r? diluare, pentru c? filtrele de hârtie nu rezista bine la concentra?ii puternice de acid sulfuric. Prepararea dizolv?rii Ceea ce r?mâne în filtru este un amestec din diferite metale ?i impurit??i. Acum trebuie s? dizolv?m totul într-un amestec acid clorhidric cu concentra?ie de 35% ?i clor (hipoclorit de sodiu), cu concentra?ie de 5%, într-o propor?ie de 2 la 1. 2 HCl + NaClO -> Cl2 + NaCl + H2O Gazul de clor: Foarte periculos! Aten?ie! Reac?ia este puternic exoterm? (adic? se degaj? o cantitate mare de c?ldur?) ?i produce clor, un gaz extrem de periculos. Gazul de clor a fost utilizat ca arma chimic? în timpul primului r?zboi mondial, sub numele de bertholite. Dizolvarea De fapt, clorul produs din amestecarea acidului clorhidric ?i hipocloritul de sodiu este ceea ce va dizolva aurul pentru a forma clorura de aur (III). 2 Au + 3 Cl2 -> 2 AuCl3 O noua filtrare Acum,tot ce trebuie sa facem este s? filtr?m totul din nou. Filtrul va retine toate impurit??ile, l?sând s? treac? doar solu?ia de clorur? de aur (III). Precipitarea Pentru a recupera aurul metalic, trebuie s? precipitam aurul care este în solu?ie. Pentru aceasta, se va folosi metabisulfit de sodiu sub form? de praf. În prezen?a apei, metabisulfitul de sodiu produce bisulfit de sodiu. Na2S2O5 + H2O –> 2NaHSO3 Bisulfitul de sodiu este ceea ce va face aurul s? precipiteze. 3 NaHSO3 + 2 AuCl3 + 3 H2O –> 3 NaHSO4 + 6 HCl + 2 Au Praful de aur Acum trebuie s? l?s?m solu?ia s? se decanteze, apoi vom recupera praful brun adunat în partea de jos a vasului. Trebuie s? fim foarte aten?i ?i s? nu îl pierdem, pentru c? acesta este aur metalic. Topirea Acum, tot ce trebuie s? facem este s? topim pulberea de aur într-un creuzet. Punctul de topire al aurului este în jur de 1064°C, deci o lamp? cu flac?r? oxiacetilenica va fi suficient? pentru aceasta treab?. Bila din aur Rezultatul este aceast? minunat? bil? din aur. Se merit? toat? aceast? treaba din punct de vedere economic? Fii sigur c? nu! Procesul este rentabil doar dac? este f?cut la scar? industrial?. De fapt, companiile care recupereaz? aurul din calculatoarele ?i piesele electronice vechi, folosesc alte metode tehnologice ?i alte substan?e chimice care sunt mult mai periculoase. Dar este interesant ?i amuzant faptul c? poate fi recuperat aurul din pl?cile de baz? vechi, folosind un procedeu f?cut în cas?. Sursa : N - i T . R o
    -1 points
This leaderboard is set to Bucharest/GMT+02:00
×
×
  • Create New...