<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.ccn.ucla.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Andrewcho</id>
	<title>Center for Cognitive Neuroscience - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.ccn.ucla.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Andrewcho"/>
	<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php/Special:Contributions/Andrewcho"/>
	<updated>2026-05-06T09:37:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Accessing_the_Cluster&amp;diff=2852</id>
		<title>Hoffman2:Accessing the Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Accessing_the_Cluster&amp;diff=2852"/>
		<updated>2015-01-28T18:52:27Z</updated>

		<summary type="html">&lt;p&gt;Andrewcho: /* GUI-Enabled SSH [Recommended] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
Here are some of our favorite ways to access the Hoffman2 Cluster login nodes.&lt;br /&gt;
&lt;br /&gt;
==SSH - Command Line==&lt;br /&gt;
SSH stands for &#039;&#039;Secure Shell&#039;&#039; and is a method of remotely logging into a computer using an encrypted connection.  It is a command line tool and is available on most *nix-based operating systems with ports available for Windows.&lt;br /&gt;
&lt;br /&gt;
===Mac/Linux/Unix===&lt;br /&gt;
====Simple SSH====&lt;br /&gt;
Use the ssh command from a terminal:&lt;br /&gt;
 ssh login_id@hoffman2.idre.ucla.edu&lt;br /&gt;
where login_id is replaced by your cluster user name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====GUI-Enabled SSH [Recommended]====&lt;br /&gt;
Macs (post - Snow Leopard 10.6.x) no longer come with a X Window System Server pre-installed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before doing the following steps, please install [http://xquartz.macosforge.org/ XQuartz] and restart your computer.&#039;&#039;&#039;&lt;br /&gt;
For more information about XQuartz, read [http://support.apple.com/kb/ht5293 here].&lt;br /&gt;
***WARNING*** MacOSX10 Yosemite needs to add &amp;quot;export Display=:0.0&amp;quot; to the local user Profile in order for it to work.&lt;br /&gt;
# Open up X11/XQuartz or Terminal.  Both are under &#039;&#039;Applications &amp;gt; Utilities&#039;&#039; on Macs.&lt;br /&gt;
# Type the command&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ ssh -X [USERNAME]@hoffman2.idre.ucla.edu&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: filling in your Hoffman2 username.&lt;br /&gt;
#: The &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; is for X11 Forwarding so that any graphics that are rendered on Hoffman2 get forwarded to the screen of your computer.&lt;br /&gt;
# Press enter and type in your password when it asks for it.  No characters or asterisks will show up while you type.&lt;br /&gt;
# Provided your typing was good, you will be greeted by the Hoffman2 login message and have successfully SSH into a login node.&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
# Go [http://hpc.ucla.edu/hoffman2/access/access.php here] and follow the instructions under &#039;&#039;Windows&#039;&#039;.  We recommend PuTTY or Cgywin.&lt;br /&gt;
 (If you use putty, please install [ xming http://sourceforge.net/projects/xming/ ] for GUI access.&lt;br /&gt;
# Once you have that setup, the process is the same as if you were on a Mac or Linux/Unix machine&lt;br /&gt;
# TODO: [More information Coming]&lt;br /&gt;
&lt;br /&gt;
==NX Client - GUI==&lt;br /&gt;
: &#039;&#039;The official description of how to do this is found [http://hpc.ucla.edu/hoffman2/access/nx.php here]&#039;&#039;&lt;br /&gt;
The NX Client program allows you to set up a Virtual Network Computing (VNC)-like session with Hoffman2.  This session will keep running even if your Internet connection drops in and out (much like [[Using Screen|screen]] on the command line).&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.7+ / Windows / Linux===&lt;br /&gt;
==== What You Need====&lt;br /&gt;
# Go to the No Machine website ([https://www.nomachine.com/download No Machine]) and download/install the No Machine for Mac OS X/Windows/Linux.&lt;br /&gt;
# Hoffman2 NX Client Public Key&lt;br /&gt;
#* To get the NX Client Public Key, follow the steps below or email support@ccn.ucla.edu&lt;br /&gt;
#** (OSX/Linux) Open up a Terminal and run the following command (replacing USERNAME with your Hoffman2 username)&lt;br /&gt;
#**:&amp;lt;code&amp;gt;$ scp USERNAME@hoffman2.idre.ucla.edu:/etc/nxserver/client.id_dsa.key ~/Documents/&amp;lt;/code&amp;gt;&lt;br /&gt;
#** (Windows) Use a sftp program and download the file /etc/nxserver/client.id_dsa.key on Hoffman2 (hoffman2.idre.ucla.edu) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Setup====&lt;br /&gt;
# Open up No Machine in Application/Desktop and Click Continue.&lt;br /&gt;
# A window titled &amp;quot;New Connection&amp;quot; will appear.  Fill out the fields accordingly&lt;br /&gt;
#* Protocol -- SSH&lt;br /&gt;
#* Host -- &amp;quot;hoffman2.idre.ucla.edu&amp;quot;&lt;br /&gt;
#* Port -- 22&lt;br /&gt;
&lt;br /&gt;
#* Select &amp;quot;Use the NoMachine login&amp;quot;&lt;br /&gt;
#* Select Alternate Server Key and (...) - and find the file (client.id_dsa.key) you downloaded earlier (in your Documents folder).&lt;br /&gt;
#* Don&#039;t use a proxy&lt;br /&gt;
#* Name -- Something like &amp;quot;Hoffman2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Double click on the connection you just created (it should be the only one in the list).&lt;br /&gt;
# Enter your Hoffman2 username and password and click &amp;quot;OK&amp;quot; (You may also check the box labeled &amp;quot;Save this setting in the configuration file&amp;quot; to avoid retyping this in the future)&lt;br /&gt;
# Select &amp;quot;Create a new session&amp;quot;. or &amp;quot;New Virtual Desktop&amp;quot;&lt;br /&gt;
# In the next menu, select Create new &#039;&#039;&#039;GNOME&#039;&#039;&#039; virtual desktop.&lt;br /&gt;
# A virtual desktop should appear!&lt;br /&gt;
&lt;br /&gt;
Reconnections in this client are not currently supported for Hoffman2, so please make sure to logout and close your connections properly. [http://hpc.ucla.edu/hoffman2/access/nx.php#logout]&lt;br /&gt;
&lt;br /&gt;
====Troubleshooting====&lt;br /&gt;
If your NX Client session freezes and you are unable to close it properly, open &#039;&#039;NX Session Administrator&#039;&#039; and disconnect your session from there. This freezing often occurs when your Internet connection is lost abruptly. Another possible cause for freezing is scrolling on certain Windows touchpads.&lt;br /&gt;
&lt;br /&gt;
For more Information [[http://hpc.ucla.edu/hoffman2/access/nx.php Hoffman2 NX Client]]&lt;br /&gt;
&lt;br /&gt;
If you are unable to open Firefox (&amp;quot;Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.&amp;quot;), deleting ~/.mozilla might fix the problem. &#039;&#039;Be warned:&#039;&#039; this will erase your profile, including bookmarks, history, saved passwords, etc! For instructions on backing up and restoring profile information, see [https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles Mozilla Support]. Make sure to perform these actions within No Machine, and not on your local system.&lt;br /&gt;
&lt;br /&gt;
== Change Passwords ==&lt;br /&gt;
Once you&#039;ve logged on and made sure its works, you can change your password to something more rememberable &lt;br /&gt;
To change passwords, logon and type:&lt;br /&gt;
 passwd&lt;br /&gt;
It should ask you for your old password and then new ones. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[http://hpc.ucla.edu/hoffman2/access/access.php Hoffman2 Access]&lt;br /&gt;
*[http://hpc.ucla.edu/hoffman2/access/nx.php Hoffman2 via NX Client]&lt;br /&gt;
*[[Hoffman2:Accessing_the_Cluster-Historical_Notes | Historical Notes]]&lt;/div&gt;</summary>
		<author><name>Andrewcho</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Accessing_the_Cluster&amp;diff=2851</id>
		<title>Hoffman2:Accessing the Cluster</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Accessing_the_Cluster&amp;diff=2851"/>
		<updated>2015-01-26T22:26:34Z</updated>

		<summary type="html">&lt;p&gt;Andrewcho: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
Here are some of our favorite ways to access the Hoffman2 Cluster login nodes.&lt;br /&gt;
&lt;br /&gt;
==SSH - Command Line==&lt;br /&gt;
SSH stands for &#039;&#039;Secure Shell&#039;&#039; and is a method of remotely logging into a computer using an encrypted connection.  It is a command line tool and is available on most *nix-based operating systems with ports available for Windows.&lt;br /&gt;
&lt;br /&gt;
===Mac/Linux/Unix===&lt;br /&gt;
====Simple SSH====&lt;br /&gt;
Use the ssh command from a terminal:&lt;br /&gt;
 ssh login_id@hoffman2.idre.ucla.edu&lt;br /&gt;
where login_id is replaced by your cluster user name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====GUI-Enabled SSH [Recommended]====&lt;br /&gt;
Macs (post - Snow Leopard 10.6.x) no longer come with a X Window System Server pre-installed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before doing the following steps, please install [http://xquartz.macosforge.org/ XQuartz] and restart your computer.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For more information about XQuartz, read [http://support.apple.com/kb/ht5293 here].&lt;br /&gt;
# Open up X11/XQuartz or Terminal.  Both are under &#039;&#039;Applications &amp;gt; Utilities&#039;&#039; on Macs.&lt;br /&gt;
# Type the command&lt;br /&gt;
#: &amp;lt;pre&amp;gt;$ ssh -X [USERNAME]@hoffman2.idre.ucla.edu&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: filling in your Hoffman2 username.&lt;br /&gt;
#: The &amp;lt;code&amp;gt;-X&amp;lt;/code&amp;gt; is for X11 Forwarding so that any graphics that are rendered on Hoffman2 get forwarded to the screen of your computer.&lt;br /&gt;
# Press enter and type in your password when it asks for it.  No characters or asterisks will show up while you type.&lt;br /&gt;
# Provided your typing was good, you will be greeted by the Hoffman2 login message and have successfully SSH into a login node.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
# Go [http://hpc.ucla.edu/hoffman2/access/access.php here] and follow the instructions under &#039;&#039;Windows&#039;&#039;.  We recommend PuTTY or Cgywin.&lt;br /&gt;
 (If you use putty, please install [ xming http://sourceforge.net/projects/xming/ ] for GUI access.&lt;br /&gt;
# Once you have that setup, the process is the same as if you were on a Mac or Linux/Unix machine&lt;br /&gt;
# TODO: [More information Coming]&lt;br /&gt;
&lt;br /&gt;
==NX Client - GUI==&lt;br /&gt;
: &#039;&#039;The official description of how to do this is found [http://hpc.ucla.edu/hoffman2/access/nx.php here]&#039;&#039;&lt;br /&gt;
The NX Client program allows you to set up a Virtual Network Computing (VNC)-like session with Hoffman2.  This session will keep running even if your Internet connection drops in and out (much like [[Using Screen|screen]] on the command line).&lt;br /&gt;
&lt;br /&gt;
===Mac OS X 10.7+ / Windows / Linux===&lt;br /&gt;
==== What You Need====&lt;br /&gt;
# Go to the No Machine website ([https://www.nomachine.com/download No Machine]) and download/install the No Machine for Mac OS X/Windows/Linux.&lt;br /&gt;
# Hoffman2 NX Client Public Key&lt;br /&gt;
#* To get the NX Client Public Key, follow the steps below or email support@ccn.ucla.edu&lt;br /&gt;
#** (OSX/Linux) Open up a Terminal and run the following command (replacing USERNAME with your Hoffman2 username)&lt;br /&gt;
#**:&amp;lt;code&amp;gt;$ scp USERNAME@hoffman2.idre.ucla.edu:/etc/nxserver/client.id_dsa.key ~/Documents/&amp;lt;/code&amp;gt;&lt;br /&gt;
#** (Windows) Use a sftp program and download the file /etc/nxserver/client.id_dsa.key on Hoffman2 (hoffman2.idre.ucla.edu) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Setup====&lt;br /&gt;
# Open up No Machine in Application/Desktop and Click Continue.&lt;br /&gt;
# A window titled &amp;quot;New Connection&amp;quot; will appear.  Fill out the fields accordingly&lt;br /&gt;
#* Protocol -- SSH&lt;br /&gt;
#* Host -- &amp;quot;hoffman2.idre.ucla.edu&amp;quot;&lt;br /&gt;
#* Port -- 22&lt;br /&gt;
&lt;br /&gt;
#* Select &amp;quot;Use the NoMachine login&amp;quot;&lt;br /&gt;
#* Select Alternate Server Key and (...) - and find the file (client.id_dsa.key) you downloaded earlier (in your Documents folder).&lt;br /&gt;
#* Don&#039;t use a proxy&lt;br /&gt;
#* Name -- Something like &amp;quot;Hoffman2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Double click on the connection you just created (it should be the only one in the list).&lt;br /&gt;
# Enter your Hoffman2 username and password and click &amp;quot;OK&amp;quot; (You may also check the box labeled &amp;quot;Save this setting in the configuration file&amp;quot; to avoid retyping this in the future)&lt;br /&gt;
# Select &amp;quot;Create a new session&amp;quot;. or &amp;quot;New Virtual Desktop&amp;quot;&lt;br /&gt;
# In the next menu, select Create new &#039;&#039;&#039;GNOME&#039;&#039;&#039; virtual desktop.&lt;br /&gt;
# A virtual desktop should appear!&lt;br /&gt;
&lt;br /&gt;
Reconnections in this client are not currently supported for Hoffman2, so please make sure to logout and close your connections properly. [http://hpc.ucla.edu/hoffman2/access/nx.php#logout]&lt;br /&gt;
&lt;br /&gt;
====Troubleshooting====&lt;br /&gt;
If your NX Client session freezes and you are unable to close it properly, open &#039;&#039;NX Session Administrator&#039;&#039; and disconnect your session from there. This freezing often occurs when your Internet connection is lost abruptly. Another possible cause for freezing is scrolling on certain Windows touchpads.&lt;br /&gt;
&lt;br /&gt;
For more Information [[http://hpc.ucla.edu/hoffman2/access/nx.php Hoffman2 NX Client]]&lt;br /&gt;
&lt;br /&gt;
If you are unable to open Firefox (&amp;quot;Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.&amp;quot;), deleting ~/.mozilla might fix the problem. &#039;&#039;Be warned:&#039;&#039; this will erase your profile, including bookmarks, history, saved passwords, etc! For instructions on backing up and restoring profile information, see [https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles Mozilla Support]. Make sure to perform these actions within No Machine, and not on your local system.&lt;br /&gt;
&lt;br /&gt;
== Change Passwords ==&lt;br /&gt;
Once you&#039;ve logged on and made sure its works, you can change your password to something more rememberable &lt;br /&gt;
To change passwords, logon and type:&lt;br /&gt;
 passwd&lt;br /&gt;
It should ask you for your old password and then new ones. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[http://hpc.ucla.edu/hoffman2/access/access.php Hoffman2 Access]&lt;br /&gt;
*[http://hpc.ucla.edu/hoffman2/access/nx.php Hoffman2 via NX Client]&lt;br /&gt;
*[[Hoffman2:Accessing_the_Cluster-Historical_Notes | Historical Notes]]&lt;/div&gt;</summary>
		<author><name>Andrewcho</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Profile&amp;diff=2583</id>
		<title>Hoffman2:Profile</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Profile&amp;diff=2583"/>
		<updated>2014-05-05T18:04:40Z</updated>

		<summary type="html">&lt;p&gt;Andrewcho: /* Password-less Logins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
In UNIX systems, there are certain configuration files that get executed every time you login.  If you are using the Bash shell (default), you have a file called &amp;lt;code&amp;gt;.bash_profile&amp;lt;/code&amp;gt; which is processed when you log in.  In order to make the FMRI toolset available to you on Hoffman2 and so you can work well with others, we recommend that you follow the instructions in the [[Hoffman2:Profile#Basics|Basics section]].  Read [[Hoffman2:Profile#Extras|Extras]] for some bells and whistles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
You account has one last thing that needs to be edited before being usable.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Use your favorite [[Text Editors|text editor]] to edit the file &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ vim ~/.bash_profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ emacs ~/.bash_profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#NEdit (H2) (OSX)|NEdit]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ nedit ~/.bash_profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Insert these lines at the &#039;&#039;&#039;bottom&#039;&#039;&#039; of the file&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;source /u/home/FMRI/apps/etc/profile&amp;amp;#10;umask 007&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;G&amp;lt;/code&amp;gt; - capital G - to go to the end of the file&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; - capital A - to go to the end of the line and enter insert mode&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt; - to insert a newline&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
#: [[Text Editors#Emacs (H2)(OSX)|Emacs]]&lt;br /&gt;
#:* Use the arrow keys to scroll the cursor down to the bottom of the document and add a newline.&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
#: [[Text Editors#NEdit (H2)|NEdit]]&lt;br /&gt;
#:* Use the arrow keys to scroll the cursor down to the bottom of the document and add a newline.&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
# Save the file&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;ESC + &amp;quot;:wq&amp;quot; + ENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs command line]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs GUI]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c, y&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* or use the menu system&lt;br /&gt;
#: [[Text Editors#NEdit (H2)|NEdit]]&lt;br /&gt;
#:* Use the menu.&lt;br /&gt;
# Log out of Hoffman2 and the next time you log in, everything will be set for you to start working.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Curious?===&lt;br /&gt;
For those that care, what you are doing is asking the computer to execute the file&lt;br /&gt;
 /u/home/FMRI/apps/etc/profile&lt;br /&gt;
every time you login.  This file modifies your PATH variable so you have access to the FMRI toolset.&lt;br /&gt;
&lt;br /&gt;
The last line&lt;br /&gt;
 umask 007&lt;br /&gt;
makes it so that any files you create will not allow &amp;quot;anyone&amp;quot; outside your group to read, write, or execute files and directories you make.  This does not automatically grant read, write, and execute privileges to you and your group though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Extras==&lt;br /&gt;
===Collaboration===&lt;br /&gt;
By default, any files and directories you create will not necessarily have permissions that allow your group to write on them.  This can be a problem if other people are supposed to build on data you processed.  We have a script ([[Hoffman2:Scripts:fix_perms.sh |fix_perms.sh]]) that will kindly find any files you own in a specified directory that don&#039;t have read/write/execute permissions for the group and make it so they do.&lt;br /&gt;
&lt;br /&gt;
You can build this script into your bash profile so that every time you log into Hoffman2, it will run in the background.  It is also recommended that you run this script at the end of jobs to make results immediately available to collaborators.&lt;br /&gt;
&lt;br /&gt;
Adding the line&lt;br /&gt;
 fix_perms.sh -q /u/home/[GROUP]/data &amp;amp;&lt;br /&gt;
to the end of your bash profile will run the permission fixer on your group&#039;s common data directory in the background quietly each time you log in. &#039;&#039;&#039;Make sure to replace [GROUP] with the name of your Hoffman2 group (e.g. mscohen, sbook, cbearden, laltshul, jfeusner or mgreen).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Colors===&lt;br /&gt;
You can change the content and color of your command prompt by editing your bash_profile.  There is a great explanation of how to do this [http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html here].&lt;br /&gt;
&lt;br /&gt;
Some of the content you can include in the command prompt:&lt;br /&gt;
;Current time&lt;br /&gt;
: You can format this however you want.  This helps when looking back through your Terminal to find when you made certain changes to files.&lt;br /&gt;
;Current working directory&lt;br /&gt;
: So you always know where you are in a filesystem and don&#039;t need to constantly retype &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;.&lt;br /&gt;
;Username&lt;br /&gt;
: Who you are.  Helpful if you are logged into multiple servers under multiple accounts and need help keeping track.&lt;br /&gt;
;Host&lt;br /&gt;
: The name of the computer you are logged into.  This also helps you know where you are at all times.&lt;br /&gt;
&lt;br /&gt;
Line to add to your bash profile&lt;br /&gt;
 export PS1=&amp;quot;\[\e[0;31m\]\h\[\e[1;37m\]:\[\e[1;34m\]\w\n\[\e[1;37m\]\D{%Y-%m-%d-%H-%M-%S} \[\e[22;32m\]\u \$ &amp;quot;&lt;br /&gt;
Resulting prompt (on a black background)&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;background:#000000; padding:5pt&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;HOST&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#000000&amp;quot;&amp;gt;:&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#0000FF&amp;quot;&amp;gt;CURRENT WORKING DIRECTORY&amp;lt;/span&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FFFFFF&amp;quot;&amp;gt; DATETIME IN ISO8601 FORMAT&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#00FF00&amp;quot;&amp;gt;USERNAME $&amp;lt;/span&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example Bash Profile==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#.bash_profile&lt;br /&gt;
&lt;br /&gt;
 # Get the aliases and functions&lt;br /&gt;
 if [ -f ~/.bashrc ]; then&lt;br /&gt;
         . ~/.bashrc&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 # Source to use FMRI Apps&lt;br /&gt;
 source /u/home/FMRI/apps/etc/profile&lt;br /&gt;
&lt;br /&gt;
 # Umask (Revoke Permissions)&lt;br /&gt;
 umask 007&lt;br /&gt;
&lt;br /&gt;
 # Collaborative permissions (Replace collabDirectory with your project Directory)&lt;br /&gt;
 fix_perms.sh -q /u/home/sbook/data/collabDirectory &amp;amp;&lt;br /&gt;
&lt;br /&gt;
 # Happy Colors&lt;br /&gt;
 export PS1=&amp;quot;\[\e[0;31m\]\h\[\e[1;37m\]:\[\e[1;34m\]\w\n\[\e[1;37m\]\D{%Y-%m-%d-%H-%M-%S} \[\e[22;32m\]\u \$ &amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Fix for QRSH when consolidating job output files&lt;br /&gt;
alias qrsh=&#039;qrsh -o /dev/null&#039;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changing Passwords ==&lt;br /&gt;
Use the command below to change password. It will prompt you for your old password, and then the new password.&lt;br /&gt;
 $ passwd&lt;br /&gt;
 Changing password for user joebruin.&lt;br /&gt;
 Please enter your current password:&lt;br /&gt;
 Please enter your new password:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Password-less Logins ==&lt;br /&gt;
The steps below will show you how to login without typing your password every time!&lt;br /&gt;
&lt;br /&gt;
On your local computer:&lt;br /&gt;
 a@A:-&amp;gt; &#039;&#039;&#039;ssh-keygen -t rsa&#039;&#039;&#039;&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/Users/A/.ssh/id_rsa): &#039;&#039;&#039;[ENTER]&#039;&#039;&#039;&lt;br /&gt;
 Created directory &#039;/home/a/.ssh&#039;.&lt;br /&gt;
 Enter passphrase (empty for no passphrase): &#039;&#039;&#039;[ENTER]&#039;&#039;&#039;&lt;br /&gt;
 Enter same passphrase again: &#039;&#039;&#039;[ENTER]&#039;&#039;&#039;&lt;br /&gt;
 Your identification has been saved in /home/a/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /home/a/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A&lt;br /&gt;
&lt;br /&gt;
Now use ssh to create a directory ~/.ssh as user on Hoffman2. (The directory may already exist, which is fine):&lt;br /&gt;
 a@A:~&amp;gt; ssh user@hoffman2.idre.ucla.edu mkdir -p .ssh&lt;br /&gt;
 user@hoffman2.idre.ucla.edu&#039;s password: &#039;&#039;&#039;[PASSWORD]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Finally append a&#039;s new public key to b@B:.ssh/authorized_keys and enter b&#039;s password one last time:&lt;br /&gt;
 a@A:~&amp;gt; cat .ssh/id_rsa.pub | ssh user@hoffman2.idre.ucla.edu &#039;cat &amp;gt;&amp;gt; .ssh/authorized_keys&#039;&lt;br /&gt;
 user@hoffman2.idre.ucla.edu&#039;s password: &#039;&#039;&#039;[PASSWORD]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now you can login to hoffman from local computer without a password!&lt;br /&gt;
 a@A:~&amp;gt; &#039;&#039;&#039;ssh user@hoffman2.idre.ucla.edu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[http://ss64.com/bash/period.html Explanation of source]&lt;br /&gt;
*[http://linux.die.net/man/2/umask Man for umask]&lt;br /&gt;
*[http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html Better explanation of umask]&lt;br /&gt;
*[http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html Coloration]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 Datetime format]&lt;/div&gt;</summary>
		<author><name>Andrewcho</name></author>
	</entry>
	<entry>
		<id>https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Profile&amp;diff=2582</id>
		<title>Hoffman2:Profile</title>
		<link rel="alternate" type="text/html" href="https://www.ccn.ucla.edu/wiki/index.php?title=Hoffman2:Profile&amp;diff=2582"/>
		<updated>2014-05-05T17:55:17Z</updated>

		<summary type="html">&lt;p&gt;Andrewcho: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Hoffman2|Back to all things Hoffman2]]&lt;br /&gt;
&lt;br /&gt;
In UNIX systems, there are certain configuration files that get executed every time you login.  If you are using the Bash shell (default), you have a file called &amp;lt;code&amp;gt;.bash_profile&amp;lt;/code&amp;gt; which is processed when you log in.  In order to make the FMRI toolset available to you on Hoffman2 and so you can work well with others, we recommend that you follow the instructions in the [[Hoffman2:Profile#Basics|Basics section]].  Read [[Hoffman2:Profile#Extras|Extras]] for some bells and whistles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basics==&lt;br /&gt;
You account has one last thing that needs to be edited before being usable.&lt;br /&gt;
&lt;br /&gt;
# [[Hoffman2:Accessing the Cluster#SSH - Command Line|SSH into Hoffman2]]&lt;br /&gt;
# Use your favorite [[Text Editors|text editor]] to edit the file &amp;lt;code&amp;gt;~/.bash_profile&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ vim ~/.bash_profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ emacs ~/.bash_profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#NEdit (H2) (OSX)|NEdit]]&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;$ nedit ~/.bash_profile&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Insert these lines at the &#039;&#039;&#039;bottom&#039;&#039;&#039; of the file&lt;br /&gt;
#:* &amp;lt;pre&amp;gt;source /u/home/FMRI/apps/etc/profile&amp;amp;#10;umask 007&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;G&amp;lt;/code&amp;gt; - capital G - to go to the end of the file&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;A&amp;lt;/code&amp;gt; - capital A - to go to the end of the line and enter insert mode&lt;br /&gt;
#:* Type &amp;lt;code&amp;gt;ENTER&amp;lt;/code&amp;gt; - to insert a newline&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
#: [[Text Editors#Emacs (H2)(OSX)|Emacs]]&lt;br /&gt;
#:* Use the arrow keys to scroll the cursor down to the bottom of the document and add a newline.&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
#: [[Text Editors#NEdit (H2)|NEdit]]&lt;br /&gt;
#:* Use the arrow keys to scroll the cursor down to the bottom of the document and add a newline.&lt;br /&gt;
#:* Type or paste in the specified lines.&lt;br /&gt;
# Save the file&lt;br /&gt;
#: [[Text Editors#Vim (H2) (OSX)|VIM]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;ESC + &amp;quot;:wq&amp;quot; + ENTER&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs command line]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c&amp;lt;/code&amp;gt;&lt;br /&gt;
#: [[Text Editors#Emacs (H2) (OSX)|Emacs GUI]]&lt;br /&gt;
#:* &amp;lt;code&amp;gt;CTRL+x, CTRL+c, y&amp;lt;/code&amp;gt;&lt;br /&gt;
#:* or use the menu system&lt;br /&gt;
#: [[Text Editors#NEdit (H2)|NEdit]]&lt;br /&gt;
#:* Use the menu.&lt;br /&gt;
# Log out of Hoffman2 and the next time you log in, everything will be set for you to start working.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Curious?===&lt;br /&gt;
For those that care, what you are doing is asking the computer to execute the file&lt;br /&gt;
 /u/home/FMRI/apps/etc/profile&lt;br /&gt;
every time you login.  This file modifies your PATH variable so you have access to the FMRI toolset.&lt;br /&gt;
&lt;br /&gt;
The last line&lt;br /&gt;
 umask 007&lt;br /&gt;
makes it so that any files you create will not allow &amp;quot;anyone&amp;quot; outside your group to read, write, or execute files and directories you make.  This does not automatically grant read, write, and execute privileges to you and your group though.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Extras==&lt;br /&gt;
===Collaboration===&lt;br /&gt;
By default, any files and directories you create will not necessarily have permissions that allow your group to write on them.  This can be a problem if other people are supposed to build on data you processed.  We have a script ([[Hoffman2:Scripts:fix_perms.sh |fix_perms.sh]]) that will kindly find any files you own in a specified directory that don&#039;t have read/write/execute permissions for the group and make it so they do.&lt;br /&gt;
&lt;br /&gt;
You can build this script into your bash profile so that every time you log into Hoffman2, it will run in the background.  It is also recommended that you run this script at the end of jobs to make results immediately available to collaborators.&lt;br /&gt;
&lt;br /&gt;
Adding the line&lt;br /&gt;
 fix_perms.sh -q /u/home/[GROUP]/data &amp;amp;&lt;br /&gt;
to the end of your bash profile will run the permission fixer on your group&#039;s common data directory in the background quietly each time you log in. &#039;&#039;&#039;Make sure to replace [GROUP] with the name of your Hoffman2 group (e.g. mscohen, sbook, cbearden, laltshul, jfeusner or mgreen).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Colors===&lt;br /&gt;
You can change the content and color of your command prompt by editing your bash_profile.  There is a great explanation of how to do this [http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html here].&lt;br /&gt;
&lt;br /&gt;
Some of the content you can include in the command prompt:&lt;br /&gt;
;Current time&lt;br /&gt;
: You can format this however you want.  This helps when looking back through your Terminal to find when you made certain changes to files.&lt;br /&gt;
;Current working directory&lt;br /&gt;
: So you always know where you are in a filesystem and don&#039;t need to constantly retype &amp;lt;code&amp;gt;pwd&amp;lt;/code&amp;gt;.&lt;br /&gt;
;Username&lt;br /&gt;
: Who you are.  Helpful if you are logged into multiple servers under multiple accounts and need help keeping track.&lt;br /&gt;
;Host&lt;br /&gt;
: The name of the computer you are logged into.  This also helps you know where you are at all times.&lt;br /&gt;
&lt;br /&gt;
Line to add to your bash profile&lt;br /&gt;
 export PS1=&amp;quot;\[\e[0;31m\]\h\[\e[1;37m\]:\[\e[1;34m\]\w\n\[\e[1;37m\]\D{%Y-%m-%d-%H-%M-%S} \[\e[22;32m\]\u \$ &amp;quot;&lt;br /&gt;
Resulting prompt (on a black background)&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code style=&amp;quot;background:#000000; padding:5pt&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;HOST&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#000000&amp;quot;&amp;gt;:&amp;lt;/span&amp;gt;&amp;lt;span style=&amp;quot;color:#0000FF&amp;quot;&amp;gt;CURRENT WORKING DIRECTORY&amp;lt;/span&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#FFFFFF&amp;quot;&amp;gt; DATETIME IN ISO8601 FORMAT&amp;lt;/span&amp;gt; &amp;lt;span style=&amp;quot;color:#00FF00&amp;quot;&amp;gt;USERNAME $&amp;lt;/span&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example Bash Profile==&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#.bash_profile&lt;br /&gt;
&lt;br /&gt;
 # Get the aliases and functions&lt;br /&gt;
 if [ -f ~/.bashrc ]; then&lt;br /&gt;
         . ~/.bashrc&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
 # Source to use FMRI Apps&lt;br /&gt;
 source /u/home/FMRI/apps/etc/profile&lt;br /&gt;
&lt;br /&gt;
 # Umask (Revoke Permissions)&lt;br /&gt;
 umask 007&lt;br /&gt;
&lt;br /&gt;
 # Collaborative permissions (Replace collabDirectory with your project Directory)&lt;br /&gt;
 fix_perms.sh -q /u/home/sbook/data/collabDirectory &amp;amp;&lt;br /&gt;
&lt;br /&gt;
 # Happy Colors&lt;br /&gt;
 export PS1=&amp;quot;\[\e[0;31m\]\h\[\e[1;37m\]:\[\e[1;34m\]\w\n\[\e[1;37m\]\D{%Y-%m-%d-%H-%M-%S} \[\e[22;32m\]\u \$ &amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Fix for QRSH when consolidating job output files&lt;br /&gt;
alias qrsh=&#039;qrsh -o /dev/null&#039;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Changing Passwords ==&lt;br /&gt;
Use the command below to change password. It will prompt you for your old password, and then the new password.&lt;br /&gt;
 $ passwd&lt;br /&gt;
 Changing password for user joebruin.&lt;br /&gt;
 Please enter your current password:&lt;br /&gt;
 Please enter your new password:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Password-less Logins ==&lt;br /&gt;
The steps below will show you how to login without typing your password every time!&lt;br /&gt;
&lt;br /&gt;
On your local computer:&lt;br /&gt;
 a@A:-&amp;gt; &#039;&#039;&#039;ssh-keygen -t rsa&#039;&#039;&#039;&lt;br /&gt;
 Generating public/private rsa key pair.&lt;br /&gt;
 Enter file in which to save the key (/Users/A/.ssh/id_rsa): &#039;&#039;&#039;[ENTER]&#039;&#039;&#039;&lt;br /&gt;
 Created directory &#039;/home/a/.ssh&#039;.&lt;br /&gt;
 Enter passphrase (empty for no passphrase): &#039;&#039;&#039;[ENTER]&#039;&#039;&#039;&lt;br /&gt;
 Enter same passphrase again: &#039;&#039;&#039;[ENTER]&#039;&#039;&#039;&lt;br /&gt;
 Your identification has been saved in /home/a/.ssh/id_rsa.&lt;br /&gt;
 Your public key has been saved in /home/a/.ssh/id_rsa.pub.&lt;br /&gt;
 The key fingerprint is:&lt;br /&gt;
 3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A&lt;br /&gt;
&lt;br /&gt;
Now use ssh to create a directory ~/.ssh as user on Hoffman2. (The directory may already exist, which is fine):&lt;br /&gt;
 a@A:~&amp;gt; ssh user@hoffman2.idre.ucla.edu mkdir -p .ssh&lt;br /&gt;
 user@hoffman2.idre.ucla.edu&#039;s password: &#039;&#039;&#039;[PASSWORD]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Finally append a&#039;s new public key to b@B:.ssh/authorized_keys and enter b&#039;s password one last time:&lt;br /&gt;
 a@A:~&amp;gt; cat .ssh/id_rsa.pub | user@hoffman2.idre.ucla.edu&#039;s &#039;cat &amp;gt;&amp;gt; .ssh/authorized_keys&#039;&lt;br /&gt;
 user@hoffman2.idre.ucla.edu&#039;s password: &#039;&#039;&#039;[PASSWORD]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Now you can login to hoffman from local computer without a password!&lt;br /&gt;
 a@A:~&amp;gt; &#039;&#039;&#039;ssh user@hoffman2.idre.ucla.edu&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==External Links==&lt;br /&gt;
*[http://ss64.com/bash/period.html Explanation of source]&lt;br /&gt;
*[http://linux.die.net/man/2/umask Man for umask]&lt;br /&gt;
*[http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html Better explanation of umask]&lt;br /&gt;
*[http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html Coloration]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/ISO_8601 ISO 8601 Datetime format]&lt;/div&gt;</summary>
		<author><name>Andrewcho</name></author>
	</entry>
</feed>