1. ssh-keygen -t rsa
2. ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host
3. ssh remote-host 'ls -ahl ./ssh/ ' : to check the permisison of authorized_keys file.
Search This Blog
Tuesday, March 20, 2012
Monday, March 19, 2012
Truncate the last letter in VI
Sometimes when you copy a text file from windows, you may have annoying characters at the end of each line. To remove then
:%s/.$//g
:%s/.$//g
Thursday, March 15, 2012
Disabling GSSAPIAuthentication in SSH
vi ~/.ssh/config
add
GSSAPIAuthentication no
add
GSSAPIAuthentication no
for loop in bash scripts
The most compatible fashion across all the bash version is :
#!/bin/bash
for i in `seq 1 10`;
do
echo $i
done
How does XenServer map vCPUs to physical processing contexts?
Please refer to http://support.citrix.com/article/ctx117960
They enumerate physical processing contexts in a depth-first manner. So, in default, vCPU0 and vCPU1 will be in the core 0.
They enumerate physical processing contexts in a depth-first manner. So, in default, vCPU0 and vCPU1 will be in the core 0.
Wednesday, March 14, 2012
Subtables
\usepackage{subfig}
and within
\begin{table}
\subfloat[caption1]
{
\begin{tabular}
\end{tabular}
}
\hspace{0.1cm}
\subfloat[caption2]
{
\begin{tabular}
\end{tabular}
}
\end{table}
.
Additionally, for resizing sub-tables,
\scalebox{0.7} {
\begin{tabular}
\end{tabular}
}
.
and within
\begin{table}
\subfloat[caption1]
{
\begin{tabular}
\end{tabular}
}
\hspace{0.1cm}
\subfloat[caption2]
{
\begin{tabular}
\end{tabular}
}
\end{table}
.
Additionally, for resizing sub-tables,
\scalebox{0.7} {
\begin{tabular}
\end{tabular}
}
.
Tuesday, March 13, 2012
How to find my CPU uses Hyperthreads?
cat /proc/cpuinfo | grep ht
Even if your kernel supports hyperthread and your CPU provides hyperthread, your kernel may not recognize a hyperthread as a CPU when it is not enabled in BIOS.
Even if your kernel supports hyperthread and your CPU provides hyperthread, your kernel may not recognize a hyperthread as a CPU when it is not enabled in BIOS.
Sunday, March 11, 2012
How to change the bullet in itemize environment
\begin{itemize}[label= xx ]
\end{itemize}
For no bullet, [label=]
Section without numbering
Use
\section*{section title}.
\section*{section title}.
How to find CPU affinity of vCPUs in XenServer/XenCenter
xe vm-param-get uuid=<uuid> Param-Names=VCPUs-Params
xe vm-param-set uuid=<uuid> Param-Names=VCPUs-Params:mask=1
xe vm-param-set uuid=<uuid> Param-Names=VCPUs-Params:mask=1
Subscribe to:
Posts (Atom)