Difference between revisions of "User:Scott/06"

From FreekiWiki
Jump to navigation Jump to search
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<h1>Linux Resources</h1>
+
      '''Laptops'''
 
+
--------------------------------
 
  Home Page      [[user:scott]]
 
  Home Page      [[user:scott]]
 
  Tech Support  [[user:scott/02]]
 
  Tech Support  [[user:scott/02]]
Line 8: Line 8:
 
  Laptops        [[user:scott/06]]
 
  Laptops        [[user:scott/06]]
 
  Resources      [[user:scott/07]]
 
  Resources      [[user:scott/07]]
 +
Notes          [[user:scott/08]]
  
 
{{TOC limit|limit=1}}
 
{{TOC limit|limit=1}}
 
__TOC__
 
__TOC__
  
==Repositories==
+
[[#top|top]]
===Freegeek Repository===
+
 
* http://wiki.freegeek.org/index.php/Freegeek_repository
+
==[http://wiki.freegeek.org/index.php/Category:Laptop_Eval Laptop_Eval]==
* sudo apt-get install freegeek-extras
+
 
 +
=Battery=
 +
==BatteryTest==
 +
type "batterytest" (start battery test)
 +
rm bat_mon        (remove old battery test)
 +
while : ; do stress-test ; sleep 300 ; done
 +
watch -n60 wc -1 bat_mon  (status update)
 +
 
 +
==Bat Pop-up Warning==
 +
gconf-editor
 +
/apps/gnome-power-manager/notify/low-capacity (un-check)
 +
 
 +
==Battery Statistics==
 +
cat /proc/acpi/battery/BAT?/{info,state}
 +
watch -n3 -d cat /proc/acpi/battery/BAT1/{info,state}
 +
Hit tab on BAT if necessary
 +
 
 +
=Monitor/WiFi on/off=
 +
*Fn + F3, F4, F5, F8, or F9
 +
 
 +
"F" key - "CRT/LCD"
 +
"F" key - "Broadcast Signal"
 +
 
 +
=Hibernation VS suspending=
 +
 
 +
Hibernation is unreliable, It writes to a swap partition reserved for system caching and temporary files.
 +
 
 +
It writes the operating system's current state to disk; all of its environmental parameters, programs, processes, etc.
 +
 +
Frequently, there won't be enough disk space to store the computer's state preventing it from successfully returning from hibernate.
 +
 +
==suspending==
 +
Suspending involves the operating system writing its state to the system RAM which is faster and generally more reliable,
 +
although it draws a little bit of power in order to keep the information stored in the RAM.
 +
 
 +
* wiki.ubuntu.com Lucidi8xxFreezes
 +
* http://wiki.freegeek.org/index.php/Laptop_Graphics
 +
 
 +
[[#top|top]]
 +
 
 +
=SSH to Talon=
 +
 +
==transfer to foyer, and then to talon.==
 +
 +
$ ssh-keygen
 +
 
 +
$ ssh scott@foyer.freegeek.org
 +
 +
- Debug: $ ssh -vvv scott@foyer.freegeek.org 2> ssh-debug.out
 +
 
 +
$ ssh scott@talon
 +
 +
$ ls /usr/local/laptop-eval/
 +
$ sftp://scott@talon/home/scott/laptop-eval
 +
 
 +
==Secure-Copy from local-host to scott@foyer==
 +
$ tar zvcf scott-laptop-photos.tar.gz /path/to/pictures
 +
 +
$ scp scott-laptop-photos.tar.gz scott@foyer.freegeek.org:~
 +
 
 +
==Secure-Copy from scott@foyer to scott@talon==
 +
 +
$ scp scott-laptop-photos.tar.gz talon:/usr/local/laptop-eval/photos/
 +
 +
[[#top|top]]
 +
 
 +
=SSH Fundamentals=
 +
 
 +
==Install SSH==
 +
sudo apt-get install openssh-client
 +
sudo apt-get install openssh-server
 +
 
 +
==Test ssh install==
 +
ssh localhost
 +
 
 +
==configure the OpenSSH server==
 +
/etc/ssh/sshd_config
 +
man sshd_config
 +
 
 +
==copy the original file and protect it from writing==
 +
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
 +
sudo chmod a-w /etc/ssh/sshd_config.original
 +
 
 +
==Configure sshd_config==
 +
 
 +
gksudo gedit /etc/ssh/sshd_config
 +
 
 +
==add the following two directives to the end of the file==
 +
PermitRootLogin no
 +
AllowUsers USERNAME
 +
 +
#Port 22
 +
Port 2222
 +
 +
#PubkeyAuthentication yes
 +
PubkeyAuthentication yes
 +
 +
#Banner /etc/issue.net
 +
Banner /etc/issue.net
 +
 
 +
==start/stop/restart sshd==
 +
 
 +
sudo /etc/init.d/ssh start
 +
sudo service ssh start
 +
 
 +
sudo /etc/init.d/ssh stop
 +
sudo service ssh stop
  
==Software Sources Binary Packages==
+
sudo /etc/init.d/ssh restart
===Medibuntu===
+
sudo service ssh restart
* packages.medibuntu.org
 
  
===Linux Kernels===
+
==Authentication==
* Production Kernels (even minor numbers)
+
*SSH keys allow authentication between two hosts without the need of a password
* The Linux kernel is a file usually called "vmlinuz"
 
* Linux Distributions – mirrors.kernel.org
 
* http://kernel.org/
 
  
==Open Source Software==
+
==Generate keys==
===Sourceforge===
+
===on local machine do:===
* http://sourceforge.net/
+
  ssh-keygen -t rsa
 +
~/.ssh/id_rsa    (private key)
 +
~/.ssh/id_rsa.pub (public key)
  
==Stay Up To Date==
+
===copy "Public Key"  ---> To Remote Server===
===Freshmeat===
+
scp ~/.ssh/id_rsa.pub user@remote:~/.ssh/my_key
* http://freshmeat.net/
 
* http://www.ibiblio.org/
 
  
==Linux Community==
+
append id_rsa.pub to
* http://calagator.org/
+
~/.ssh/known_hosts
 +
 +
by entering:
 +
ssh-copy-id username@remotehost

Latest revision as of 13:20, 14 January 2012

     Laptops
--------------------------------
Home Page      user:scott
Tech Support   user:scott/02
Dir & Files    user:scott/03
Network        user:scott/04
Troubleshoot   user:scott/05
Laptops        user:scott/06
Resources      user:scott/07
Notes          user:scott/08 

Template:TOC limit

top

Laptop_Eval

Battery

BatteryTest

type "batterytest" (start battery test)
rm bat_mon         (remove old battery test)
while : ; do stress-test ; sleep 300 ; done
watch -n60 wc -1 bat_mon  (status update)

Bat Pop-up Warning

gconf-editor
/apps/gnome-power-manager/notify/low-capacity (un-check)

Battery Statistics

cat /proc/acpi/battery/BAT?/{info,state}
watch -n3 -d cat /proc/acpi/battery/BAT1/{info,state}
Hit tab on BAT if necessary 

Monitor/WiFi on/off

  • Fn + F3, F4, F5, F8, or F9
"F" key - "CRT/LCD"
"F" key - "Broadcast Signal"

Hibernation VS suspending

Hibernation is unreliable, It writes to a swap partition reserved for system caching and temporary files.
It writes the operating system's current state to disk; all of its environmental parameters, programs, processes, etc. 

Frequently, there won't be enough disk space to store the computer's state preventing it from successfully returning from hibernate. 

suspending

Suspending involves the operating system writing its state to the system RAM which is faster and generally more reliable, 
although it draws a little bit of power in order to keep the information stored in the RAM.

top

SSH to Talon

transfer to foyer, and then to talon.

$ ssh-keygen
$ ssh scott@foyer.freegeek.org

- Debug: $ ssh -vvv scott@foyer.freegeek.org 2> ssh-debug.out 
$ ssh scott@talon

$ ls /usr/local/laptop-eval/
$ sftp://scott@talon/home/scott/laptop-eval

Secure-Copy from local-host to scott@foyer

$ tar zvcf scott-laptop-photos.tar.gz /path/to/pictures

$ scp scott-laptop-photos.tar.gz scott@foyer.freegeek.org:~

Secure-Copy from scott@foyer to scott@talon

$ scp scott-laptop-photos.tar.gz talon:/usr/local/laptop-eval/photos/ 

top

SSH Fundamentals

Install SSH

sudo apt-get install openssh-client
sudo apt-get install openssh-server

Test ssh install

ssh localhost

configure the OpenSSH server

/etc/ssh/sshd_config
man sshd_config

copy the original file and protect it from writing

sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original
sudo chmod a-w /etc/ssh/sshd_config.original

Configure sshd_config

gksudo gedit /etc/ssh/sshd_config

add the following two directives to the end of the file

PermitRootLogin no
AllowUsers USERNAME

#Port 22 
Port 2222

#PubkeyAuthentication yes 
PubkeyAuthentication yes 

#Banner /etc/issue.net 
Banner /etc/issue.net 

start/stop/restart sshd

sudo /etc/init.d/ssh start
sudo service ssh start
sudo /etc/init.d/ssh stop
sudo service ssh stop
sudo /etc/init.d/ssh restart
sudo service ssh restart

Authentication

  • SSH keys allow authentication between two hosts without the need of a password

Generate keys

on local machine do:

 ssh-keygen -t rsa
~/.ssh/id_rsa     (private key)
~/.ssh/id_rsa.pub (public key)

copy "Public Key" ---> To Remote Server

scp ~/.ssh/id_rsa.pub user@remote:~/.ssh/my_key
append id_rsa.pub to
~/.ssh/known_hosts 

by entering: 
ssh-copy-id username@remotehost