Using SSH

From SHellium Wiki
Jump to: navigation, search
Geographylogo.png In other languages: English | Afrikaans | Albanian | Arabic | Brazilian | Bulgarian | Catalan | Chinese | Croatian | Czech | Danish | Dutch | Esperanto | Estonian | Filipino | Finnish | Flemish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Latvian | Lithuanian | Macedonian | Malay | Malayalam | Norwegian (Bokmål) | Norwegian (Nynorsk) | Persian | Polish | Portuguese | Romanian | Russian | Serbian | Slovak | Slovenian | Spanish | Swedish | Turkish | Ukrainian | Urdu

Note: Please do not use any online SSH tunnels, like SerFISH, as they will just get your account locked for having more than one.

Contents

Windows:

Putty

The best way to login into shellium.org from Windows is using SSH. You can download PuTTY, a free SSH client, from here.

You can also use PuTTY Portable, which does not require any major installation, just extraction to a USB drive or something similar. You can get it here. However, PuTTY portable does not save login details. Also, other than mobile PuTTY that you can put on a USB stick or drive, there is also a mobile cellphone version called PocketPuTTY. You can download it by clicking this link.

  1. Enter ssh.shellium.org as the hostname. Select the SSH protocol with the default port number (22). Type a description in the Saved Sessions box then click Save, so you won't have to enter the port and hostname every time you run PuTTY.
  2. Click Open to start your SSH session.

Type your username and password to enter the shell.
If you type your password incorrectly 6 times, you will be put on the ban list for 15-60 minutes. Please wait a minute or notify a team member so we can remove you from the ban list

Cygwin

An alternate way to log in to SHellium is by using Cygwin. Cygwin attempts to emulate a GNU/Linux environment on Windows. As such, the method to log in is exactly the same as the #Linux and friends (*BSD, Minix, ...) section below. Please note it is required to select OpenSSH in the Cygwin installer before you can use this method.

Automating the login process using a file
  1. Copy putty.exe to your "system32" folder, e.g. c:\windows\system32\
  2. Create a batch file (e.g. shellium.bat) on the Desktop with the following code:
 putty ssh.shellium.org -l USERNAME

where "USERNAME" is your shell username

  1. Double click on the batch file to run it.
Automating the login process using only putty
  1. Go to the Connection->Data section before saving the session.
  2. Enter your username in the Auto-login username box.
  3. Go back to the Session section and finaly save your session by clicking in the Save button.

Linux and friends (*BSD, Minix, ...)

To connect to ssh.shellium.org via SSH, do the following...

  1. If you are running X Window, open your console (Konsole, xterm, rxvt, etc.). You should see the command prompt.
  2. Type
 ssh USERNAME@ssh.shellium.org

or

 ssh -l USERNAME ssh.shellium.org

specifying your appropriate shellium.org username. Look up the ssh man page to learn about numerous options that ssh accepts. You know about man pages, don't you? If not, type:

 man ssh
  1. Once connected, the shellium.org ROBOT will appear and you'll be prompted for a password.
  2. Type the password, and you will be logged in and ready to use your shell.

If you can't login, join the #shellium channel at irc.freenode.net to unlock your shell account.

Installing SSH on Unix-like systems

You can install OpenSSH in Arch Linux by using either pacman (or any of the various pacman wrappers such as powerpill, yaourt, or the GUI Shaman), or with the ABS.

If using Shaman, search for and install the openssh package. If are using pacman from the console you need to type (as root, or with sudo):

 pacman -S openssh

You will then need to configure it. As that is out of the scope of this article, refer here.

  • Debian-based distros (Ubuntu, Debian)

You can install OpenSSH in a Debian based distro by using the console based apt (or it's derivatives such as aptitude) or a GUI wrapper (such as Synaptic or Adept). If you're using a GUI, search for and install the ssh package. This will install the OpenSSH package. If you are using apt from the console please use (as root or with sudo):

 sudo apt-get install ssh


OpenSSH is already installed on most Gentoo-based distros (Sabayon[1],Calculate[2])


  • FreeBSD

OpenSSH is installed as part of the installation process.

GNOME

If you're using GNOME, you may consider using Gnome SSH Tunnel Manager (gSTM) as your 'Putty' for SSH tunneling. This will also work if you simply have gSTM installed, meaning you can run it under Xfce, KDE, etc. Tested on Ubuntu Jaunty Jackalope(8.04), all you need to do is search for gSTM in Synaptic/Adept and install it. Then you will need to configure your Shellium connection.

To do that:

  1. Click Add
  2. Type a name for the connection, whatever suits you- something like Shellium will do just fine.
  3. In the login box, type your shellium username.
  4. In the host box, type ssh.shellium.org
  5. Port is 22, should be 22 by default, if not just set it to 22.
  6. Click OK button
  7. Now click on Start and wait for the password prompt, enter your password as requested and it should be fine.

How to upload files to your shell account securely

Since you have ssh access, you can use SFTP to upload files.

Unix and friends

scp

scp is much like cp, some people even just use scp instead of cp all the time, for local copying too.

Syntax:

scp [[user@]host1:]file1 [[user@]host2:]file2

Some options:

-P port
-r             # Recursively copy a directory
-o ssh_option

Example

Lets say I want to copy file readme.txt from my local home directory to my shellium account home directory and my username is coder1:

scp ~/readme.txt coder1@shellium.org:~

Or download a directory named foobar from my shellium account (it'll create a folder named foobar in my home directory):

scp coder1@shellium.org:~/foobar ~

You are then asked for your ssh password and the file(s) will subsequently be copied.

For more Information on scp visit the Manpage

sftp

sftp is like ftp. If you are familiar with ftp you are familiar with sftp too. Usage:

 sftp hostname

or

 sftp username@hostname
  • SSH protocol can compress your data. If you are using a slow link and transfer compressable data try key -C
 sftp -C username@hostname

FISH virtual file system

Have you heared about Midnight Commander? It's an extremely useful tool. If you didn't use it yet, try:

 mc

in your console.

Go into Left or Right->Shell link... menu, and enter username@hostname in the box or use username@hostname:C to enable compression.

The KDE web browsers Konqueror and Dolphin are able to use fish:// URLs and so can link to SSH connections and use a connection like a regular folder.

Simply go to fish://user@url.com and the browser will initiate your connection.

Microsoft

The most useful ssh package is PuTTY. It includes:

 PuTTY:     ssh GUI analog
 PuTTYtel:  telnet GUI analog
 PSCP:      scp console analog
 PSFTP:     sftp console analog
 Plink:     ssh console analog
 Pageant:   ssh-agent GUI analog
 PuTTYgen:  ssh-keygen GUI analog, can import openssh keys

The console utils are similar to the *nix equivalents.

WinSCP

A user-friendlier alternative to transfer files from/to your shell would be using WinSCP. This is a free, open-source, GPL licensed SFTP/SCP/FTP client software supporting explorer/commander-like graphical interfaces. It's really easy to use for beginners but it comes packed with advanced features like integration with PuTTY's authentication agent for public key authentication with SSH, semi or fully automatic directory synchronization, scripting for automated operations, U3 pendrive support. You can get it from WinSCP's website.

Total Commander SFTP PlugIn

If you use Total Commander you can download SFTP PlugIn. Simply enter in it in Total Commander to install it.

Personal tools
Namespaces

Variants
Actions
Navigation
Indexes
SHellium Sites
Toolbox