banana Blog

Main menu

Skip to primary content
Skip to secondary content
  • Home

Post navigation

← Older posts

git -ls-remote

Posted on May 8, 2012 by alex
Reply

$ git ls-remote
From ssh://user@ip/dir
somehash HEAD
somehash refs/heads/master

Posted in Uncategorized | Tagged git, ls, remote, show | Leave a reply

Setting Up Glassfish3 Application Server

Posted on January 26, 2012 by alex
1

Continue from Install Glassfish3 JEE Application Server

  1. glassfish@server:~$ cd /home/glassfish
  2. Create a domain:
    glassfish@server:~$ glassfish3/bin/asadmin create-domain release

Done!

Posted in Setup Ubuntu Server 10.04, System Administration, Tutorials | Tagged Glassfish, JavaEE | 1 Reply

Install Glassfish3 JEE Application Server

Posted on January 26, 2012 by alex
1

On the server:

  1. Add user glassfish
  2. root@server:~$ cd /home/glassfish
  3. root@server:~$ wget http://download.java.net/glassfish/3.1.1/release/glassfish-3.1.1.zip
  4. root@server:~$ unzip glassfish-3.1.1.zip

Done!

Continue with Setup Glassfish3 JEE Application Server

Posted in Setup Ubuntu Server 10.04, System Administration, Tutorials | Tagged Glassfish, Java, JavaEE, ubuntu | 1 Reply

Prevent git user from logging in via ssh

Posted on January 11, 2012 by alex
Reply

Problem:
If you have a git server running, that is hosting projects multiple users are working on, you may want to prevent these users to log in to server via ssh.

They should only be allowed to push and pull things from git repository (ssh) but should have no rights on the server.

Solution:

  1. Change /etc/passwd from something like this:

    [...]
    git:x:1001:1001:,,,:/home/git:/bin/bash
    [...]
    

    to something like this:

    [...]
    git:x:1001:1001:,,,:/home/git:/usr/bin/git-shell
    [...]
    

    (assuming git userid is 1001 and git home is /home/git)

  2. Append to /etc/shells:
    /usr/bin/git-shell.
    It should look something like this:

    [...]
    /usr/bin/screen
    /usr/bin/git-shell
    [...]
    
Posted in Uncategorized | Tagged git, login, server, shell, ssh | Leave a reply

“You Ain’t Gonna Need It”

Posted on January 8, 2012 by alex
Reply

The more programming experience you gain, the more you will realize how important this principle really is: Wikipedia.org: You Ain’t Gonna Need It. In combination with proper Code Refactoring, your coding will be much faster and straight forward!

Read this book:
Refactoring: Improving the Design of Existing Code

Posted in Programmer's basics | Tagged code, programming, refactoring, YAGNI | Leave a reply

Install Java

Posted on December 14, 2011 by alex
Reply

On a server environment, you don’t need the complete jre package. It also includes some desktop-specific packages. What you rather want to install is

*jre-headless:

user@server:~$ sudo apt-get install openjdk-6-jre-headless
Posted in Java, Setup Ubuntu Server 10.04, System Administration, Tutorials | Leave a reply

handle password by ssh Agent

Posted on December 13, 2011 by alex
Reply
user@client:~$ ssh-add path/to/auth/file/user_rsa
Enter passphrase for path/to/auth/file/user_rsa:
Identity added: path/to/auth/file/user_rsa (path/to/auth/file/user_rsa)
Posted in Setup Ubuntu Server 10.04, System Administration, Tutorials | Tagged password, ssh, ssh-agent, store | Leave a reply

ssh connection by RSA, disable password login

Posted on December 13, 2011 by alex
Reply

On the client:

user@client:~$ ssh-keygen -t rsa
user@client:~$ ssh-copy-id -i path/to/auth/file/user_rsa.pub user@server

On the server:

user@server:~$ sudo nano /etc/ssh/sshd_config

add/ change following:

RSAAuthentication yes
PubkeyAuthentication yes
ChallengeResponseAuthentication no
PasswordAuthentication no

user@server:~$ sudo service ssh restart
Posted in Setup Ubuntu Server 10.04, System Administration, Tutorials | Tagged login, password, rsa, server, ssh, ubuntu, {$user} | Leave a reply

Add user to sudoers

Posted on December 13, 2011 by alex
Reply
root@server:~$ visudo

add/ change following:

user ALL=(ALL) ALL

Posted in Setup Ubuntu Server 10.04, System Administration, Tutorials | Tagged sudo, sudoers, tutorial, ubuntu, {$user} | Leave a reply

Add user

Posted on December 13, 2011 by alex
1
root@server:~$ adduser user
Posted in Setup Ubuntu Server 10.04, System Administration, Tutorials | Tagged add, adduser, server, setup, tutorial, ubuntu, {$user} | 1 Reply

Post navigation

← Older posts

Recent Posts

  • git -ls-remote
  • Setting Up Glassfish3 Application Server
  • Install Glassfish3 JEE Application Server
  • Prevent git user from logging in via ssh
  • “You Ain’t Gonna Need It”

Recent Comments

  • Install Glassfish3 JEE Application Server | banana Blog on Setting Up Glassfish3 Application Server
  • Setting Up Glassfish3 Application Server | banana Blog on Install Glassfish3 JEE Application Server
  • Install Glassfish3 JEE Application Server | banana Blog on Add user
  • The Wnt- β-catenin / -canonical pathway | banana Blog on Genes: APC (Adenomatous polyposis coli)
  • Genes: APC (Adenomatous polyposis coli) | banana Blog on The Wnt- β-catenin / -canonical pathway

Archives

  • May 2012
  • January 2012
  • December 2011
  • August 2011
  • May 2011
  • March 2011
  • February 2011
  • January 2011
  • September 2010
  • August 2010
  • July 2010
  • May 2010

Categories

  • Banana Facts
  • Biology
  • Cancer
  • EJB
  • Genes
  • Java
  • JavaEE
  • JPA
  • JSF
  • Pathways
  • Programmer's basics
  • Setup Ubuntu Server 10.04
  • System Administration
  • Tutorials
  • Uncategorized

Meta

  • Register
  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
Proudly powered by WordPress