The Blog

Author: admin

Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id

Posted on

You can login to a remote Linux server without entering password in 3 simple steps using ssky-keygen and ssh-copy-id as explained in this article.

ssh-keygen creates the public and private keys. ssh-copy-id copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also assigns proper permission to the remote-host’s home, ~/.ssh, and ~/.ssh/authorized_keys.

This article also explains 3 minor annoyances of using ssh-copy-id and how to use ssh-copy-id along with ssh-agent.

Step 1: Create public and private keys using ssh-key-gen on local-host

jsmith@local-host$ [Note: You are on local-host here]

For cygwin or php cli use "ssh-keygen -m PEM -t rsa"
ssh-keygen 
Generating public/private rsa key pair.
Enter file in which to save the key (/home/jsmith/.ssh/id_rsa):[Enter key]
Enter passphrase (empty for no passphrase): [Press enter key]
Enter same passphrase again: [Pess enter key]
Your identification has been saved in /home/jsmith/.ssh/id_rsa.
Your public key has been saved in /home/jsmith/.ssh/id_rsa.pub.
The key fingerprint is:
33:b3:fe:af:95:95:18:11:31:d5:de:96:2f:f2:35:f9 jsmith@local-host

Step 2: Copy the public key to remote-host using ssh-copy-id

jsmith@local-host$ ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host
jsmith@remote-host's password:
Now try logging into the machine, with "ssh 'remote-host'", and check in:

.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

Note: ssh-copy-id appends the keys to the remote-host’s .ssh/authorized_key.
Use this command to remove entries from known_hosts:

ssh-keygen -R hostname

You will also have to remove those entries from authorized_keys

Posted in Linux, Networking Leave a comment

Bringing Win 8 back to Earth

Posted on

Remove metro all the way including all it’s apps:

In PowerShell

Get-AppxPackage –AllUsers
Get-AppxPackage -AllUsers | Remove-AppxPackage
Get-AppXProvisionedPackage -online | Remove-AppxProvisionedPackage –online

 

Add Start button:

http://www.classicshell.net/

Auto Logon:

http://www.howtogeek.com/112919/

Use Sysinternals to clean some more:

http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx

Add some reg tweaks:

[HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\Copy To]
@="{C2FBB630-2971-11D1-A18C-00C04FD75D13}"

[HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\Move To]
@="{C2FBB631-2971-11D1-A18C-00C04FD75D13}"

[HKEY_CURRENT_USER\Control Panel\Desktop]
"AutoEndTasks"="1"
"HungAppTimeout"="1000"
"MenuShowDelay"="8"
"WaitToKillAppTimeout"="2000"
"LowLevelHooksTimeout"="1000"

[HKEY_CURRENT_USER\Control Panel\Mouse]
"MouseHoverTime"="8"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoLowDiskSpaceChecks"=dword:00000001
"LinkResolveIgnoreLinkInfo"=dword:00000001
"NoResolveSearch"=dword:00000001
"NoResolveTrack"=dword:00000001
"NoInternetOpenWith"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"WaitToKillServiceTimeout"="2000"

More of the same here:
http://www.askvg.com/master-tutorial-to-make-your-windows-8-super-fast/

Get your CD from M$

http://windows.microsoft.com/en-US/windows-8/upgrade-product-key-only

Posted in Uncategorized Leave a comment

Managing power plans on win 7 with task manager.

Posted on

You can use Task scheduler to run powercfg.exe

use a command window to run powercfg /? so you can see the various commands available

running powercfg /l lists the codes “GUIDs” for your power schemes

running powercfg -s sets the active scheme – this is the command you want to set up in Task scheduler & you’ll need to select the “Run with highest privileges” checkbox in task scheduler to run the command using admin rights [or a command line window opened with admin rights during testing]. All powercfg commands that do more than provide info will need admin rights.
I assume you are running Win7 [I think these items are the same in Vista but cannot check].

Posted in Uncategorized Leave a comment

SSHD slow on login

Posted on

Does the IP you’re connecting from have reverse DNS on it?

When you connect to SSH, By default it will try to do a DNS lookup on the IP connecting and if it can’t find a record it causes a long delay when logging in.

If you want you can disable sshd from doing a reverse lookup by setting

UseDNS no

In /etc/ssh/sshd_config and restarting sshd.

service sshd restart

Posted in Linux Leave a comment
« Previous PageNext Page »