sobota, 20 sierpnia 2011

SSH login using keys

If you login on some remote ssh server often, you should consider using ssh keys to login without authorizing with password every each time. To achieve that goal server you want to login to need to know your local account and then let you in without asking for password. So first of all we need to generate key to identify local account:

ssh-keygen -t rsa

You should not enter any passphrase. Now you should have ~/.ssh/id_rsa.pub file (it's a default file, you could change the path of course) that is your public key that will be seen from the outside (kind of security passage ;)). So you need to put that key on the server, so it could identify your account. To do it you should place content of your local id_rsa.pub to the ~/.ssh/authorized_keys on the server (if this file does not exists - create it, f it exists do not erase it, just append your key on the end of the file - you can access you server's account via public keys from many remote accounts if you want to).
To copy your key to the server you can use copy & paste if you use some gui or use "oldschool" method:

cat .ssh/id_rsa.pub | ssh server_login@server_address 'cat >> .ssh/authorized_keys'

After that you should be able to login on the server without any password. It is also very useful if you have some other services on the server that use ssh protocol - git is a good example.

niedziela, 31 lipca 2011

git remote repository

Let's assume we have some external server that we want to use as main/backup repository and we have ssh access to this server. First thing is to create base repository on the server:

mkdir PROJECT.git
cd PROJECT.git
git init-db --bare

Then, on the client side:
cd PROJECT
git init

git remote add origin SERVER_PATH
git config branch.master.remote origin
git config branch.master.merge master

git add .
git commit -a -m 'initial commit'
git push origin master

The SERVER_PATH should be like: username@server.address.net:~/path_to_PROJECT.git

And we are done.

sobota, 19 grudnia 2009

NTFS and MacOS

Readonly NTFS partitons are visible from the start in Leopard and Snow Leopard. If you want to have rw possibilities - that's another story.

Leopard: NTFS-3G is good, working solution.

Snow Leopard: rw mode is built in but not used by default. To make it work:
First - check mounted partitions and choose disk-partition number, simply enter in terminal:
mount
Second - if you know which partition is your desired ntfs partition, then check its id (let's pretend ntfs partition is first partition on second disk - disk2s1):
echo `sudo /System/Library/Filesystems/ntfs.fs/ntfs.util -k disk2s1`
Third - ok, we have its id. Now edit /etc/fstab file (or create new if you don't have it) and put there (remember to put there your real disk UUID!):
UUID=your_ntfs_partition_id none ntfs rw
Done. Just restart. Complicated? Well, its not that simple as installing some software but with three really simple steps your system is untouched and everything works. And there is another problem with NTFS-3G - it's not working on SL x64 ;) so for me its useless anyway.

piątek, 18 grudnia 2009

TextMate problems on SnowLeopard (Command+Arrows)

I was very upset when i found out that one of most used editor shortcuts (Command+Left Arrow = windows' home, Command+Right Arrow = windows' end) doesnt work on SnowLeopard. However it's not a big problem - TextMate have special page for SL problems and there is bundle to handle this problem.

czwartek, 17 grudnia 2009

SnowLeopard & ATI 4670

Well... ATI 4670 with SnowLeopard on PC it's tricky for me... there are many described ways to make it work but none worked for me. Magic was: i had it running for about a week and then suddenly it stopped working! I looked everywhere, order another cable (it haven't came till now ;)), i was pissed off so much that i even tried to back to windows (which caused me another pain)...

Ok, so here is the deal: it works with PCI_EFI 10.5, vanilla kexts, "GraphicsEnabler=y -pci0" (-pci0 or -pci1 depends on motherboard type) arguments at boot time (it's all kind of normal with SL on PC) but (!) my vga monitor have to be plugged into vga output WITH dvi2vga dongle inserted into dvi slot! If i put my monitor into dvi through dvi2vga or vga only - there is no way my 4670 would work.

I really have to buy Mac.

sobota, 5 grudnia 2009

SnowLeopard installation

Installation of Snow Leopard is pretty simple if you already have some OsX (or you have access to it). First things first: kexts in OsX is just like drivers under windows. Mac's are sold with specific hardware thus it's much simpler for Apple to maintain only that exact drivers. That's why if you have some OsX compatible hardware - you're lucky ;)

There are number of ways to install SL on non Apple hardware (yes, its against license). I tried (successfully) pretty simple way of creating usb installer using some prepared scripts. If you want to try all you have to do is check what kexts (drivers) you would need (and dsdt modifications - but its pretty easy too). There are many, many pages at Insanelymac and other sites (google is very helpful) where people write about that stuff. After completing those files there you have to through pdf included in MacLoader. It's pretty simple and intuitive. When you're done all you have to do is reboot and install SL from usb.

Harware requirements:
* 8 Gb flash drive
* hdd especially for OsX (it has its own partition table type)


If you need any more details or information about files needed for asus p5k-e just write here, i will try to help you. Good luck!