<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>#!SUITS &#187; Tutorials</title>
	<atom:link href="http://suits.it.usyd.edu.au/wordpress/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://suits.it.usyd.edu.au/wordpress</link>
	<description>Sydney University IT Society</description>
	<lastBuildDate>Sun, 18 Oct 2009 14:50:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mounting SIT home drives on Linux</title>
		<link>http://suits.it.usyd.edu.au/wordpress/2009/03/30/mounting-sit-home-drives-on-linux/</link>
		<comments>http://suits.it.usyd.edu.au/wordpress/2009/03/30/mounting-sit-home-drives-on-linux/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 22:39:22 +0000</pubDate>
		<dc:creator>tim.dawborn</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[SIT]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://suits.it.usyd.edu.au/wordpress/?p=560</guid>
		<description><![CDATA[
Assuming you are on the SIT network, you are able to mount your SIT home drive locally using SAMBA.

sudo mount -t cifs -o user=abcd9999,servern=ITCASESEC,uid=foo,gid=1001 //itcasesec/abcd9999 /mnt/abcd9999

where your SIT username is &#8220;abcd9999&#8243;, your local username is &#8220;foo&#8221;, and the GID of &#8220;foo&#8221; is &#8220;1001&#8243;. The folder /mnt/abcd999 should already exist (or change it to where ever [...]]]></description>
			<content:encoded><![CDATA[<p>
Assuming you are on the SIT network, you are able to mount your SIT home drive locally using SAMBA.
</p>
<p><code>sudo mount -t cifs -o user=abcd9999,servern=ITCASESEC,uid=foo,gid=1001 //itcasesec/abcd9999 /mnt/abcd9999</code></p>
<p>
where your SIT username is &#8220;abcd9999&#8243;, your local username is &#8220;foo&#8221;, and the GID of &#8220;foo&#8221; is &#8220;1001&#8243;. The folder <code>/mnt/abcd999</code> should already exist (or change it to where ever you would like to mount the folder).</p>
]]></content:encoded>
			<wfw:commentRss>http://suits.it.usyd.edu.au/wordpress/2009/03/30/mounting-sit-home-drives-on-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tutorial: Sharing files within SIT</title>
		<link>http://suits.it.usyd.edu.au/wordpress/2008/10/17/tutorial-sharing-files-within-sit/</link>
		<comments>http://suits.it.usyd.edu.au/wordpress/2008/10/17/tutorial-sharing-files-within-sit/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 05:13:43 +0000</pubDate>
		<dc:creator>Chris Leong</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://suits.it.usyd.edu.au/wordpress/?p=457</guid>
		<description><![CDATA[When working on an assignment it is often good to be able to share files with your team members. Email is commonly used, but often not the best solution. Here are some alternatives.

SVN is the preferred way because it also gives you version control. For some subjects you may be given an SVN repository, but [...]]]></description>
			<content:encoded><![CDATA[<p>When working on an assignment it is often good to be able to share files with your team members. Email is commonly used, but often not the best solution. Here are some alternatives.</p>
<p><span id="more-457"></span></p>
<p>SVN is the preferred way because it also gives you version control. For some subjects you may be given an SVN repository, but unfortunately this isn&#8217;t alway available. </p>
<p>If you just want to share the files, the chmod a+r FILENAME will allow this to happen, but your directories above might need to be publicly executable (chmod a+x DIRNAME).</p>
<p>Another option is the pair netfile/netget.</p>
<p>For netfile type:</p>
<p>netfile USERNAME FILENAMES</p>
<p>to send files to a particular user.</p>
<p>That user just types</p>
<p>netget</p>
<p>to view the files they have been sent. They can then choose to accept the file by entering y. Note though, that this overrides local files.</p>
]]></content:encoded>
			<wfw:commentRss>http://suits.it.usyd.edu.au/wordpress/2008/10/17/tutorial-sharing-files-within-sit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: SIT &#8211; SFTP</title>
		<link>http://suits.it.usyd.edu.au/wordpress/2008/04/18/tutorial-sit-sftp/</link>
		<comments>http://suits.it.usyd.edu.au/wordpress/2008/04/18/tutorial-sit-sftp/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 07:40:37 +0000</pubDate>
		<dc:creator>Chris Leong</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[SIT]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://suits.it.usyd.edu.au/wordpress/?p=54</guid>
		<description><![CDATA[Instructions on how to access the files in your SIT home directory from your own computer.

You will need an SFTP client.
Windows: FileZilla
Mac OSX: Cyberduck
All Linux distros should be able to connect by SFTP without additional software. Try typing sftp://user@host into the location bar of the file manager.
Connnect using
Host: ftp.ug.it.usyd.edu.au
Username Your SIT username
Password: Your SIT password
Port: [...]]]></description>
			<content:encoded><![CDATA[<p>Instructions on how to access the files in your SIT home directory from your own computer.</p>
<p><span id="more-54"></span></p>
<p>You will need an SFTP client.</p>
<p>Windows: <a href="http://filezilla-project.org/">FileZilla</a></p>
<p>Mac OSX: <a href="http://cyberduck.ch/">Cyberduck</a></p>
<p>All Linux distros should be able to connect by SFTP without additional software. Try typing sftp://user@host into the location bar of the file manager.<br />
Connnect using</p>
<pre>Host: ftp.ug.it.usyd.edu.au
Username Your SIT username
Password: Your SIT password
Port: 22
Protocol: SFTP</pre>
<p>Make sure you connect using SFTP (port 22) rather than FTP (port 21). FTP is very insecure and will transmit your username and password unencrypted over the network.</p>
<p>With any of the above clients you should be able to bookmark the URL so you don&#8217;t have to type the hostname every time. Once again, make sure you choose SFTP for security. You can optionally save the password locally.</p>
]]></content:encoded>
			<wfw:commentRss>http://suits.it.usyd.edu.au/wordpress/2008/04/18/tutorial-sit-sftp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tutorial: SIT Network Proxy Setup</title>
		<link>http://suits.it.usyd.edu.au/wordpress/2008/04/14/tutorial-sit-network-proxy-setup/</link>
		<comments>http://suits.it.usyd.edu.au/wordpress/2008/04/14/tutorial-sit-network-proxy-setup/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 07:38:43 +0000</pubDate>
		<dc:creator>James Bunton</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[SIT]]></category>

		<guid isPermaLink="false">http://suits.it.usyd.edu.au/wordpress/?p=26</guid>
		<description><![CDATA[Web browser proxy settings for the School of IT network. Also instructions on how to make Unix command line utilities work with proxies.

Firefox settings
In Firefox 2.0, go to Edit-&#62;Preferences-&#62;Advanced-&#62;Network-&#62;Connection Settings
Put in the proxy details (host www-cache.it.usyd.edu.au, port 8000) and check the box marked &#8220;Use the same proxy for all protocols&#8221;. At the bottom there is [...]]]></description>
			<content:encoded><![CDATA[<p>Web browser proxy settings for the School of IT network. Also instructions on how to make Unix command line utilities work with proxies.</p>
<p><span id="more-26"></span></p>
<h3>Firefox settings</h3>
<p>In Firefox 2.0, go to Edit-&gt;Preferences-&gt;Advanced-&gt;Network-&gt;Connection Settings</p>
<p>Put in the proxy details (host www-cache.it.usyd.edu.au, port 8000) and check the box marked &#8220;Use the same proxy for all protocols&#8221;. At the bottom there is a list of domains to not use a proxy, add:<br />
<code>, .usyd.edu.au</code><br />
Alternatively you can use the autoconfigure URL:<br />
<code>http://www.it.usyd.edu.au/proxy.pac</code></p>
<h3>Unix Environment Variables</h3>
<p>See <a title="Command Line Proxy Tutorial" href="/wordpress/2008/04/14/tutorial-command-line-proxy">Command Line Proxy Tutorial</a> for more details.</p>
]]></content:encoded>
			<wfw:commentRss>http://suits.it.usyd.edu.au/wordpress/2008/04/14/tutorial-sit-network-proxy-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: Command Line Proxy</title>
		<link>http://suits.it.usyd.edu.au/wordpress/2008/04/14/tutorial-command-line-proxy/</link>
		<comments>http://suits.it.usyd.edu.au/wordpress/2008/04/14/tutorial-command-line-proxy/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 07:36:48 +0000</pubDate>
		<dc:creator>James Bunton</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[SIT]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://suits.it.usyd.edu.au/wordpress/?p=23</guid>
		<description><![CDATA[Want to have your command line applications use the correct proxy to connect to the internet? Instructions here are applicable to Linux, OSX and other Unix systems.

Unix Environment
To use the School of IT proxies you want to set the following environment variables:
export http_proxy="http://www-cache.it.usyd.edu.au:8000"
export no_proxy="127.0.0.1, localhost, .usyd.edu.au"
sudo environment vars
sudo clears all environment variables before executing the [...]]]></description>
			<content:encoded><![CDATA[<p>Want to have your command line applications use the correct proxy to connect to the internet? Instructions here are applicable to Linux, OSX and other Unix systems.</p>
<p><span id="more-23"></span></p>
<h3>Unix Environment</h3>
<p>To use the School of IT proxies you want to set the following environment variables:<br />
<code>export http_proxy="http://www-cache.it.usyd.edu.au:8000"<br />
export no_proxy="127.0.0.1, localhost, .usyd.edu.au"</code></p>
<h3>sudo environment vars</h3>
<p>sudo clears all environment variables before executing the command for security. This means if you run something like<br />
<code>$ sudo aptitude update</code><br />
it won&#8217;t work because http_proxy gets cleared. You can fix this by doing the following. Be careful!<br />
<code>$ sudo visudo</code><br />
Add this line:</p>
<pre>Defaults env_keep="http_proxy https_proxy ftp_proxy no_proxy"</pre>
<h3>Mac OS X Location Settings</h3>
<p>If you use Mac OS X and change locations frequently it&#8217;d be nice if your command line utilities picked up the proxy settings from System Preferences.</p>
<p>Have a look at <a href="http://delx.net.au/projects/proxyconf">http://delx.net.au/projects/proxyconf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://suits.it.usyd.edu.au/wordpress/2008/04/14/tutorial-command-line-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: SIT Personal Webspace</title>
		<link>http://suits.it.usyd.edu.au/wordpress/2008/03/05/tutorial-sit-personal-webspace/</link>
		<comments>http://suits.it.usyd.edu.au/wordpress/2008/03/05/tutorial-sit-personal-webspace/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 07:38:06 +0000</pubDate>
		<dc:creator>tim.dawborn</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[SIT]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://suits.it.usyd.edu.au/wordpress/?p=25</guid>
		<description><![CDATA[Did you know that the Usyd School of IT servers provide personal webspace for any students studying IT?
You can have your own website at a URL like http://www.ug.it.usyd.edu.au/~userXYXY

To set up your personal webspace allowed on your School of IT (SIT) account, log into a congo machine either at uni or via SSH and type the [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that the Usyd School of IT servers provide personal webspace for any students studying IT?<br />
You can have your own website at a URL like http://www.ug.it.usyd.edu.au/~userXYXY</p>
<p><span id="more-25"></span></p>
<p>To set up your personal webspace allowed on your School of IT (SIT) account, log into a congo machine either at uni or via SSH and type the following commands:</p>
<pre>$ mkdir -p ~/lib/html
$ chmod 711 ~
$ chmod -R 711 ~/lib
$ cd ~/lib/html</pre>
<p>Create your webpage in this directory (~/lib/html), say it is called <em>index.html</em>. Now to make it publicly visible on the internet, type the following:</p>
<pre>$ chmod a+r index.html</pre>
<p>Then assuming your Usyd username is <em>abcd1234</em>, open your Internet browser and go to <em>http://www.ug.it.usyd.edu.au/~abcd1234/</em></p>
]]></content:encoded>
			<wfw:commentRss>http://suits.it.usyd.edu.au/wordpress/2008/03/05/tutorial-sit-personal-webspace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: SSH using PuTTY</title>
		<link>http://suits.it.usyd.edu.au/wordpress/2008/03/02/tutorial-ssh-using-putty/</link>
		<comments>http://suits.it.usyd.edu.au/wordpress/2008/03/02/tutorial-ssh-using-putty/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 07:35:14 +0000</pubDate>
		<dc:creator>Edmund Tse</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://suits.it.usyd.edu.au/wordpress/?p=21</guid>
		<description><![CDATA[PuTTY is a program that allows you to use ssh on Windows. It has all the features of the Unix OpenSSH, and is an essential piece of software for any Windows user.

The instructions in the SSH Tutorial are for use within any unix environment. It&#8217;s a good idea to read this anyway, as chances are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> is a program that allows you to use ssh on Windows. It has all the features of the Unix OpenSSH, and is an essential piece of software for any Windows user.</p>
<p><span id="more-21"></span></p>
<p>The instructions in the <a title="SSH Tutorial" href="/wordpress/2007/04/17/tutorial-ssh">SSH Tutorial</a> are for use within any unix environment. It&#8217;s a good idea to read this anyway, as chances are you&#8217;ll be logging in to a Unix SSH server.</p>
<h3>SSH Public/Private Keys</h3>
<p>In a standard installation of PuTTY, there is a tool named PuTTYgen. This is the alternative tool to the Unix ssh-keygen command which generates a public/private key pair.</p>
<h4>Generating the public/private key pair</h4>
<p>When PuTTYgen is run, you will be presented with a dialog box that asks you to move your mouse over the it to generate some randomness. All you need to do at this stage is move your mouse so that the cursor moves over the dialog box. Continue to move the cursor until the progress bar reaches 100%.</p>
<p>Afterwards, click on the &#8220;Save private key&#8221; button to output your private key to a .ppk file. Store this file in a safe location on your computer. Click on the &#8220;Save public key&#8221; button to output your public key to file. The contents of this file is equivalent to the id_rsa.pub file generated using ssh-keygen, which should be appended to the ~/.ssh/authorized_keys file on the SSH server.</p>
<h4>Using the key/pair</h4>
<p>To use a generated key pair when you connect to a server, you will need to reference the private key (.ppk file) when you configure the PuTTY SSH session.</p>
<p>Starting PuTTY, you will see a hierarchy of settings on the left hand side of the window. The settings page that we are concerned with is located under Connection &gt; SSH &gt; Auth. When you have selected &#8220;Auth&#8221;, you will notice that the settings page on the right hand side will change. Click on the &#8220;Browse&#8221; button for &#8220;Private key file for authentication&#8221;, then locate and select the .ppk file you have generated earlier. After the key is selected, your connection to the server will then attempt the public/private key authentication method.</p>
<p>Optionally, you may provide a default username to enter when you connect to the server under &#8220;Login details&#8221; on the page at Connection &gt; Data.</p>
<h3>Web Proxy Port Forwarding</h3>
<p>See the background information on the <a title="SSH Port Forwarding" href="/wordpress/2007/12/04/tutorial-ssh-port-forwarding">SSH Port Forwarding</a>.</p>
<p>Choose a host to connect to using SSH, e.g. congo1.ug.it.usyd.edu.au (or just congo1) on the standard port 22.</p>
<p>Go to Connection-&gt;SSH-&gt;Tunnels and set: Source port: 8000 Destination www-cache.it.usyd.edu.au:8000 Don&#8217;t forget to click add!</p>
<p>Click open at the bottom to start the connection. Now you can set your browser to proxy through localhost:8000 and it&#8217;ll go through the SIT web cache.</p>
]]></content:encoded>
			<wfw:commentRss>http://suits.it.usyd.edu.au/wordpress/2008/03/02/tutorial-ssh-using-putty/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: SSH Port Forwarding</title>
		<link>http://suits.it.usyd.edu.au/wordpress/2007/12/04/tutorial-ssh-port-forwarding/</link>
		<comments>http://suits.it.usyd.edu.au/wordpress/2007/12/04/tutorial-ssh-port-forwarding/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 07:34:30 +0000</pubDate>
		<dc:creator>James Bunton</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ucc]]></category>

		<guid isPermaLink="false">http://suits.it.usyd.edu.au/wordpress/?p=20</guid>
		<description><![CDATA[This describes how to use an SSH tunnel to access web sites from the UCC (University Computing Centre) wireless network. This is what you want to read if youâ€™re an SIT student and you want internet access from your laptop in Wentworth, etc.

Please read this page in it&#8217;s entirety. It&#8217;s very useful to understand how [...]]]></description>
			<content:encoded><![CDATA[<p>This describes how to use an SSH tunnel to access web sites from the UCC (University Computing Centre) wireless network. This is what you want to read if youâ€™re an SIT student and you want internet access from your laptop in Wentworth, etc.</p>
<p><span id="more-20"></span></p>
<p>Please read this page in it&#8217;s entirety. It&#8217;s very useful to understand how these techniques work.</p>
<h3>Background</h3>
<p>SIT means School of Information Technologies. This tutorial will only be useful if you&#8217;re an SIT student. UCC means University Computing Centre. They do lots of things, including supplying wireless networks for people to connect to throughout the university.</p>
<p>If you connect to a wireless network in a building like Wentworth, chances are it&#8217;s the UCC network. They supply a rather annoying (to me) VPN client which you&#8217;re supposed to use to access external sites through their wireless.</p>
<p>A proxy, for our purposes, means a computer that has greater network access than you, and can make requests on your behalf and return the result.</p>
<h3>Procedure</h3>
<p>The UCC wireless gives you limited connectivity without their VPN client. Thankfully this connectivity includes the ability to SSH to computers on the SIT network.</p>
<p>The SIT runs a web proxy, which requires an SIT username/password and allows access to web pages on the internet. The server is www-cache.it.usyd.edu.au and runs on port 8000. These are the settings you use when you&#8217;re directly connected to the SIT network, eg using a computer in the labs.</p>
<p>Note that your SIT internet quota is separate and in addition to your UCC quota. So if you&#8217;ve run out of your SIT web quota, you can still connect to the internet using VPN, and keep surfing the net with your UCC internet quota.</p>
<p>You cannot connect directly to the SIT web proxy from the wireless, and you cannot SSH directly to the SIT web proxy. However you can SSH to one of the congos, say congo1. SSH has a nice feature called TCP tunneling. Basically what it does is allow you to forward connections to a port on your computer (localhost) to a port on a remote computer, through an SSH connection. Here&#8217;s a diagram:</p>
<p>You connect to congo1 from your laptop.</p>
<pre>[laptop]  &lt;-ssh connection-&gt;  [congo1]</pre>
<p>You want to use congo1 as a proxy to connect to the SIT web proxy. Nice eh?</p>
<pre>         (forwarded connection
          piggybacks over SSH)
[laptop]  &lt;-ssh connection-&gt;  [congo1]
                                | (forwarded connection)
             [www-cache.it.usyd.edu.au]</pre>
<h3>Details</h3>
<p>Individual forwarding command:<br />
<code><br />
ssh -L 1234:desthost:4321 userXYXY@proxyhost</p>
<ul>
<li> The -L means enable port forwarding.</li>
<li> The first port number is the port to listen to on the machine you're running the SSH client on.</li>
<li> The second field and third fields specify the host and port which you want your connection to end up at. This is from the perspective of the machine you're SSHing to.</li>
<li> The last parameter is the username@host of the computer you want to SSH to, the one doing the forwarding.</li>
</ul>
<p>The end result, is that if you connect to localhost:1234 on your machine locally, then it gets forwarded through proxyhost to port 4321 on desthost.</p>
<h3>Web Proxy Quick HOWTO</h3>
<p>To set this up, you run one command. See above for details on the options.<br />
</code><code>ssh -L 8000:www-cache.it.usyd.edu.au:8000 userXXXX@congo1.ug.it.usyd.edu.au</code><br />
Now you have an SSH tunnel. Whenever you connect to localhost:8000 the connection will be forwarded through congo1 to www-cache.it.usyd.edu.au:8000</p>
<p>So you need to configure your web browser to use as the proxy: Host: localhost Port: 8000</p>
<p>This can be simplified by using the ssh config file (see <a href="http://suits.it.usyd.edu.au/wordpress/2007/04/17/tutorial-ssh/">see SUITS tutorial</a>) instead of typing out this long command.<br />
<code><br />
Host sitproxy<br />
&nbsp;&nbsp;&nbsp;&nbsp;HostName congo1.ug.it.usyd.edu.au<br />
&nbsp;&nbsp;&nbsp;&nbsp;User userXXXX<br />
&nbsp;&nbsp;&nbsp;&nbsp;LocalForward 8000 www-cache.it.usyd.edu.au:8000<br />
</code><br />
Which can then be used via<br />
<code><br />
$ ssh sitproxy<br />
</code></p>
<h3>Jabber (Google Talk) Quick HOWTO</h3>
<p>The SIT network allows unproxied outgoing connections on port 443 to all hosts. This port is usually used for HTTPS, that&#8217;s secure HTTP. Many Jabber servers (google talk, jabber.org.au) also listen on this port.</p>
<p>You can take advantage of this by proxying your Jabber connections from the UCC wireless through one of the congos. Run this command for google talk, or modify it as appropriate for your Jabber server.</p>
<pre>ssh -L 5222:talk.google.com:443 userXXXX@congo1.ug.it.usyd.edu.au</pre>
<p>Then go into your Jabber client and set it to connect to a specific host/port. Host: localhost Port: 5222</p>
<h3>Postgrad Account</h3>
<p>For those with a postgraduate account, you can connect through a postgraduate server, avoiding the proxy/download limit issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://suits.it.usyd.edu.au/wordpress/2007/12/04/tutorial-ssh-port-forwarding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tutorial: Email Forwarding</title>
		<link>http://suits.it.usyd.edu.au/wordpress/2007/10/26/tutorial-email-forwarding/</link>
		<comments>http://suits.it.usyd.edu.au/wordpress/2007/10/26/tutorial-email-forwarding/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 07:37:35 +0000</pubDate>
		<dc:creator>Edmund Tse</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[ucc]]></category>
		<category><![CDATA[USYD]]></category>

		<guid isPermaLink="false">http://suits.it.usyd.edu.au/wordpress/?p=24</guid>
		<description><![CDATA[Want to set up your Usyd UniKey email account and/or IT email account to forward to your regular email address?

Forwarding your UniKey Email
UniKey email is your university-wide account. In 2009, the uni has moved student email accounts to a new service running on Outlook Live. Your email address is now unikey@uni.sydney.edu.au. Here are some tips [...]]]></description>
			<content:encoded><![CDATA[<p>Want to set up your Usyd UniKey email account and/or IT email account to forward to your regular email address?</p>
<p><span id="more-24"></span></p>
<h3>Forwarding your UniKey Email</h3>
<p>UniKey email is your university-wide account. In 2009, the uni has moved student email accounts to a new service running on Outlook Live. Your email address is now <a href="mailto:unikey@uni.sydney.edu.au">unikey@uni.sydney.edu.au</a>. Here are some tips from SUITS to get the most out of your new email account.</p>
<p>To <strong>transfer your email </strong>from your old account to your new one, <a href="http://www.usyd.edu.au/ict/switch/SydneyMail/faq.shtml">follow these instructions</a>.</p>
<p>If you like to automatically <strong>forward your uni email </strong>to a non-uni account, you can redirect all emails by <a href="http://www.usyd.edu.au/ict/switch/SydneyMail/forwardemail.shtml">following these instructions</a>.</p>
<p>To <strong>pick up your uni email via POP</strong>, the POP server is <a href="http://outlook.com">outlook.com</a>, port 995 (if you enable SSL). The username to provide is <a href="mailto:unikey@uni.sydney.edu.au">unikey@uni.sydney.edu.au</a>. For more advanced setups including SMTP, <a href="http://www.usyd.edu.au/ict/switch/pdf/email/EML010Othermailservers.pdf">take a look at this</a>.</p>
<p>(This post contains info put together from <a href="http://edmundtse.wordpress.com/2009/05/07/sydney-mail-where-did-my-emails-go/">Edmund&#8217;s blog</a> and <a href="http://www.nointrigue.com/blog/2009/05/07/forwarding-university-of-sydney-student-email/">Enoch&#8217;s blog</a>.)</p>
<h3>Forwarding IT Email</h3>
<p>If you have an account with SIT, then you&#8217;ll have an IT email address. While not much emails are sent this this address (unless you tell people to), you might get the odd email every now and then.</p>
<pre>$ ssh USERNAME@mail.ug.it.usyd.edu.au
$ mailforward -a ADDRESS</pre>
]]></content:encoded>
			<wfw:commentRss>http://suits.it.usyd.edu.au/wordpress/2007/10/26/tutorial-email-forwarding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tutorial: Unix Fundamentals</title>
		<link>http://suits.it.usyd.edu.au/wordpress/2007/07/31/tutorial-unix/</link>
		<comments>http://suits.it.usyd.edu.au/wordpress/2007/07/31/tutorial-unix/#comments</comments>
		<pubDate>Tue, 31 Jul 2007 07:36:11 +0000</pubDate>
		<dc:creator>James Bunton</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://suits.it.usyd.edu.au/wordpress/?p=22</guid>
		<description><![CDATA[Unix is a powerful system, well worth getting to know for the productivity benefits you can obtain, and also for the experience of learning to use a new operating system. This tutorial provides an introduction to get you from no knowledge of Unix to having a basic skillset good enough for day to day tasks, [...]]]></description>
			<content:encoded><![CDATA[<p>Unix is a powerful system, well worth getting to know for the productivity benefits you can obtain, and also for the experience of learning to use a new operating system. This tutorial provides an introduction to get you from no knowledge of Unix to having a basic skillset good enough for day to day tasks, in a position for you to learn more.</p>
<p><span id="more-22"></span></p>
<h3>The Fundamentals</h3>
<p>In Unix, there is the tools philosophy. That is, there are lots of little programs that do one job, and do it well. These programs have short, often cryptic names, such as ls =&gt; list files, cp =&gt; copy. This makes them easier to type, and you&#8217;ll be typing them a lot!</p>
<p>You type these commands at a shell. The one you&#8217;ll be using is called bash, however there are others, such as tcsh or zsh. The shell gives you a prompt that will look something like this:<br />
<code>user@host:~$<br />
-bash-2.05b$</code><br />
When you see this prompt, it means the shell is ready for you to type a command. Generally when a command finishes successfully, nothing will be displayed but another prompt. For the purposes of this tutorial, we will abbreviate the prompt to simply a dollar sign: $ You can exit a shell by typing exit, logout, or pressing CTRL-D.</p>
<p>For almost all of these commands, you can specify flags, or options to modify their behaviour. For example, the &#8216;ls&#8217; command will not show hidden files by default. Hidden files are files that start with a period, eg &#8216;.bashrc&#8217;. If you specify the &#8216;-a&#8217; option, then &#8216;ls&#8217; will show these files. Eg,<br />
<code>$ ls -a</code><br />
These flags are also known as parameters, or arguments, and these terms are used interchangeably.</p>
<p>For some commands it may make sense to combine flags. In this case, you can either list them one after the other&#8230;<br />
<code>$ ls -l -a</code><br />
&#8230; or you can specify them in the same argument.<br />
<code>$ ls -la</code><br />
Unix commands may also take file or directory names as parameters. The &#8216;cat&#8217; command will print the contents of a file to the screen, it needs to be told which file to print.<br />
<code>$ cat MyFile.txt</code><br />
You can pass flags along with other parameters. Eg, the &#8216;-n&#8217; option to cat tells it to precede each line with a line number.<br />
<code>$ cat -n MyFile.txt</code><br />
It is considered good style to put all flag parameters before any others. In fact, many older Unix systems require this.</p>
<p>If you&#8217;re running a command that is taking a while, or you want to stop it for any reason, you can press CTRL-C to kill it (quit the program).</p>
<p>On a Unix system, everybody has their own account. Each account is given a home folder for that person to place all of the files. You can only access the files in your own home folder. You can refer to your home folder by the shorthand ~, or somebody elses home by the shorthand ~myfriend</p>
<p>Everything in Unix is case sensitive. That is, file.txt and fiLe.txt are different files, and can contain completely different content. This also goes for command names, as well as all flags and other parameters.</p>
<p>As you know, directories can contain files, or other directories in a hierarchical manner. If we have a folder called &#8220;projects&#8221;, with a folder called &#8220;mygame&#8221; inside, we can refer to the &#8220;mygame&#8221; folder as follows:</p>
<pre>  projects/mygame</pre>
<p>The slash character must be a forward slash, and is referred to as the directory separator. This is the only character that cannot be present in a Unix filename. If there is a file called &#8220;game.java&#8221; inside the &#8220;mygame&#8221; folder, then we can refer to it as:</p>
<pre>  projects/mygame/game.java</pre>
<p>These two examples are called paths, to a directory and a file respectively.</p>
<p>For various reasons, it is also not a great idea to have spaces in Unix filenames. You can, but generally you shouldn&#8217;t.</p>
<p>A simple text editor you can use in these examples is nano. It is worth putting in the time to learn a more advanced editor such as vim at some point though. Nano is a very simple editor to use. The commands it supports are displayed at the bottom of the screen. CTRL-O to save (write out), and CTRL-X to exit.</p>
<h3>Basic Commands</h3>
<p>This section provides a brief synopsis of the most frequently used commands, as well as a few examples of how to use them and what their usage looks like. For more details, you should read the manual page. Like this:<br />
<code>$ man somecommand</code><br />
You should also try out all of these commands on some files you have. Don&#8217;t try these on Word documents or anything like that, these commands are designed to run on plain text files.</p>
<h4>Command &#8211; ls</h4>
<p>Lists the contents of a directory, optionally displaying detailed information about files or folders</p>
<p>List the files in the current directory<br />
<code>$ ls<br />
Project.java Project.class</code><br />
Display a detailed listing of these files<br />
<code>$ ls -l<br />
-rw-------  1 username    group        223 Jul 20 20:28 Project.java<br />
-rw-------  1 username    group        223 Jul 20 20:32 Project.class</code><br />
List the files in a directory, including hidden files<br />
<code>$ ls -a<br />
.hiddenFile Project.java Project.class</code><br />
Combine the above two options<br />
<code>$ ls -la<br />
-rw-------  1 username    group        100 Jul 20 20:28 .hiddenFile<br />
-rw-------  1 username    group        223 Jul 20 20:28 Project.java<br />
-rw-------  1 username    group       5723 Jul 20 20:32 Project.class<br />
</code><br />
Display the contents of the specified directory<br />
<code>$ ls documents<br />
Report.txt Letter.txt</code></p>
<h4>Command &#8211; cd</h4>
<p>Change directory. This command allows you to change the current directory that you&#8217;re working in.</p>
<p>Change into the documents directory<br />
<code>$ cd documents</code><br />
Change into the directory above the current, that is, change into the parent directory. Eg, say there is a folder &#8220;projects&#8221;, and inside that a folder &#8220;mygame&#8221;<br />
<code>$ cd projects/mygame<br />
$ cd ..</code><br />
Go up two directories at a time.<br />
<code>$ cd ../..</code></p>
<h4>Command &#8211; mv</h4>
<p>Move or rename a file or folder.</p>
<p>Rename file.txt into junk.txt<br />
<code>$ mv file.txt junk.txt</code><br />
Move file.txt into a folder called trash<br />
<code>$ mv file.txt trash</code><br />
Move documents/report.txt into a folder called trash<br />
<code>$ mv documents/report.txt trash<br />
$ cd documents<br />
$ mv report.txt ../trash</code><br />
Rename the documents directory to be called MyDocuments<br />
<code>$ mv documents MyDocuments</code></p>
<h4>Command &#8211; mkdir</h4>
<p>Make a new empty directory<br />
<code>$ mkdir nameofdir</code></p>
<h4>Command &#8211; cp</h4>
<p>Copy files or folders</p>
<p>Copy file.txt to backup.txt<br />
<code>$ cp file.txt backup.txt</code><br />
Copy file.txt into a new folder<br />
<code>$ mkdir mystuff<br />
$ cp file.txt mystuff</code><br />
Copy a directory<br />
<code>$ cp -a mydir newdir</code></p>
<h4>Command &#8211; rm</h4>
<p>Removes files and/or directories (BE CAREFUL!)</p>
<p>Remove a file<br />
<code>$ rm file.txt</code><br />
Remove a directory<br />
<code>$ rm -r dir</code><br />
Remove a directory without prompting for confirmation (!!! No way to recover the files once they&#8217;re gone !!!)<br />
<code>$ rm -rf dir</code></p>
<h4>Command &#8211; cat</h4>
<p>Displays the files listed on the command line on the screen (concatenate).</p>
<p>Display one file<br />
<code>$ cat file.txt<br />
contents of file here</code><br />
<code>$ cat file.txt otherfile.txt<br />
contents of file here<br />
contents of other file here</code></p>
<h4>Command &#8211; tail</h4>
<p>Displays the last lines in a file</p>
<p>Display the last 10 lines in a file<br />
<code>$ tail file.txt<br />
last 10 lines in the file go here</code><br />
Displays the last 1 line in a file<br />
<code>$ tail -n 15 file.txt<br />
last line of file</code></p>
<h4>Command &#8211; head</h4>
<p>Similar to tail, but displays the top of the file<br />
<code>$ head file.txt<br />
first 10 lines of file</code></p>
<h4>Command &#8211; wc</h4>
<p>Displays statistics about a file: line count, word count, character count.</p>
<p>Display file statistics<br />
<code>$ wc file.txt<br />
   8  22 262 file.txt<br />
</code><br />
Display just the line count<br />
<code>$ wc -l file.txt<br />
8</code><br />
<a name="grep"></a></p>
<h4>Command &#8211; grep</h4>
<p>Search for text in a file or files</p>
<p>Search for the word apple in file.txt<br />
<code>$ grep apple file.txt<br />
line containing apple is here</code><br />
Search for the word apple in all files in a directory<br />
<code>$ grep -R apple somedir<br />
file.txt: line containing apple is here<br />
otherfile.txt: also have apple in this line</code><br />
Searching for the word apple in a file that doesn&#8217;t contain it prints nothing<br />
<code>$ grep apple file2.txt</code></p>
<h4>Command &#8211; echo</h4>
<p>Prints whatever arguments you pass to it on the screen</p>
<p>Display some text on the screen<br />
<code>$ echo Hello World<br />
Hello World</code><br />
Display text with special formatting characters<br />
<code>$ echo -e 'Hello\nWorld'<br />
Hello<br />
World</code></p>
<h4>Command &#8211; diff</h4>
<p>Displays the difference between two files</p>
<p>If we have file1.txt looking like this:<br />
<code>apple<br />
banana<br />
orange<br />
grape</code><br />
and file2.txt looking like this:<br />
<code>apple<br />
orange<br />
grape</code><br />
We then run diff to compare them:<br />
<code>$ diff -u file1.txt file2.txt<br />
--- file1.txt   2007-07-23 23:01:39.000000000 +1000<br />
+++ file2.txt   2007-07-23 23:02:59.000000000 +1000<br />
@@ -1,4 +1,3 @@<br />
apple<br />
-banana<br />
orange<br />
grape</code><br />
If two files that are the same are compared, nothing is printed<br />
<code>$ diff -u file1.txt file1.txt</code></p>
<h4>Command &#8211; scp</h4>
<p>You can use SSH to copy files from one location to another. The syntax is very simple to the cp command, except one of the source or destination can be on a remote machine.</p>
<p>Copy the file thesis.txt to a directory projects on the server congo4.<br />
<code>$ scp thesis.txt userXYXY@congo4:projects/</code></p>
<p>Copy the entire projects directory on congo4 to the current directory locally.<br />
<code>$ scp -r userXYXY@congo4:projects/ .</code></p>
<h3>Pipes and Redirection</h3>
<p>Everything in Unix is a file. From the perspective of a program, this includes the keyboard and the screen.</p>
<p>All commands that you run from the shell have three special files available to them. Standard input (stdin), standard output (stdout) and standard error (stderr). stdin in is what you type on the keyboard, stdout and stderr you see displayed on the screen.</p>
<p>That is, when you type a command like<br />
<code>$ ls -l</code><br />
and see the file listing displayed on the screen, that is because the program &#8216;ls&#8217; is writing it to the file stdout. Perhaps you instead wish it to be written to a file called listing.txt You could redirect stdout from the program to a file, like this:<br />
<code>$ ls -l &gt; listing.txt</code><br />
Try out the program &#8216;bc&#8217; on the command line. It is a calculator. You can type simple equations with integers and it will print the results. It reads questions as input from stdin (one per line), and writes outputs to stdout. Edit a file and put a few questions, like &#8216;2+2&#8242; on it, then run this command.<br />
<code>$ bc &lt; questions.txt</code><br />
You should see your answers printed. You can even do this to have your answers written to a file.<br />
<code>$ bc &lt; questions.txt &gt; answers.txt</code><br />
What if we want to check if any of the answers in the file were &#8216;4&#8242;? We could use the grep command to find out like this:<br />
<code>$ grep 4 answers.txt</code><br />
If there is a line in the answers file that contains the character 4, then it will be printed.</p>
<p>We can make this more exact by using a regular expression (which is a separate topic that you should look up) like this:<br />
<code>$ grep '^4$' answers.txt</code><br />
That will only match a 4 on a line by itself. Now this will print out all the lines that contain a 4.</p>
<p>Say we wanted to count how many of these answers were 4?<br />
<code>$ grep '^4$' answers.txt &gt; count.txt<br />
$ wc -l count.txt</code><br />
You may be starting to see the kind of uses that you can put this to now. However it might seem a little messy to have to create all these temporary files just to get the result we want. There is a better way, we use what&#8217;s known as a pipe. If we pipe two programs together, then the shell will connect the stdout of one to the stdin of the other.  We can do all of the above in one command like so:<br />
<code>$ bc &lt; questions.txt | grep '^4$' | wc -l</code><br />
Notice that both &#8216;grep&#8217; and &#8216;wc&#8217; will read from stdin if you don&#8217;t specify a file as a parameter. This form is much shorter, and more in the Unix spirit.</p>
<h3>Useful Tips</h3>
<p>You can scroll through the history of commands by pressing up and down. That is, press up to see the last command you ran, up again to see the next last and so on.</p>
<p>CTRL-R searches through previously typed commands. Eg, if you know you typed a really long ssh command and want to find it again, press CTRL-R, type ssh and you will see the most recently typed ssh command. Press CTRL-R to see the one before that, and so on.</p>
<p>All your history is stored in the file ~/.bash_history</p>
<p>If you use vi/vim then you can make the bash command line use those keybindings by running this command:<br />
<code>$ cp ~suits/pub/dotfiles/.inputrc ~/.inputrc</code></p>
<h3>Printing</h3>
<p>Print a file to printer (SIT printers are named in the form &#8220;pr1-&lt;room number&gt;&#8221; in general):<br />
<code>$ lpr -P&lt;printer&gt; &lt;filename&gt;</code><br />
eg.<br />
<code>$ lpr -Ppr1-117 MyClass.java</code><br />
Note that does not wrap or format the given file in any way to make it fit on the page. If you wish to print out code, with syntax highlighting and wrapping, use the following command:<br />
<code>$ a2ps -E -s2 -t4 -P&lt;printer&gt; &lt;filename&gt;</code><br />
To check the print queue for a given printer, the command is<br />
<code>$ lpq -P&lt;printer&gt;</code><br />
Each person with an SIT account has a print quota allocated to them for the duration of a semester. To check your current print quota<br />
<code>$ prquota</code></p>
]]></content:encoded>
			<wfw:commentRss>http://suits.it.usyd.edu.au/wordpress/2007/07/31/tutorial-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
