Take use of the line printer in Soc

Use the line printer in Soc, one can only print *.txt files and must send the print command form Unix environment.

Another alternative is to use the SSH client.

Obtaining and Installing SSH for Windows

simple_header.gif

Why use SSH for Windows?

  • Your work will be secure from theft or vandalism

  • The system you are connecting to will be more secure from an attack using your user ID

  • You can edit your remote Unix files on the Windows desktop instead of using a Unix editor

  • You can print your remote Unix files on your Windows printer

  • You can browse and view remote Unix directories and files from your Windows desktop

  • You can set file permissions from your Windows desktop

  • You can seamlessley use an X11 graphic client, like XWin32

  • A free implementation of SSH for Windows is available.

SSH (Secure Shell) is a program that provides you with a secure connection to a remote computer. It replaces the old Telnet program that has a serious security problem. With Telnet, your password was transmitted over unsecured channels as plain-text. Unscrupulous users could easily capture your user ID and password, putting your Unix work (and the Unix system you are connecting to) at risk.

SSH has two components, the server-side running on the remote Unix machine and the client-side running on your Windows computer. �These programs encrypt and decrypt the traffic between your Windows and the remote machine, so that even if the traffic was captured, it would be meaningless.

To access Unix systems like MACI, WestGrid, and AIX from your Windows machine, you need to install an SSH client on it. Get the free (non-commerial use) version of SSH for Windows here.

Once you have downloaded the file, navigate to it and double-click to install it. Allow SSH to choose the default settings for the install.

To enable graphics from the remote Unix system to be displayed on your local Windows screen, you need to enable X11 tunneling. Start SSH and use the following menu. Edit >> Settings >> Profile Settings >> Tunneling. Click the "Tunnel X11 connections" box. In order to take advantage of this, you must also have an X11 client such as XWin32 installed and running on your PC. To confirm that X11graphics works, type "xclock" on your Unix command line and a graphics clock will open on your Windows Desktop.

Using Secure Shell

There are actually two programs installed, Secure Shell Client and Secure File Transfer Client.

Secure Shell Client

Start the Secure Shell Client: Start >> Programs>> SSH Secure Shell >> Secure Shell Client

defaultssh.jpg

To connect to a remote system, click Quick Connect.

connectrh.jpg

Fill in the first two fields with the system name you are connecting to and your username on that system, as shown above. Click Connect.

hostid.jpg

This box will appear the first time you connect to a remote system. SSH is establishing, between the client on your computer and the server on Unix, how the traffic will be encoded and decoded. It is this step that secures your connection.

pword.jpg

Key in your password for the remote Unix system and press Enter.

latticessh.jpg

You are connected to the remote Unix system. When you are finished your Unix session, you should log out (type �exit�) before you close SSH.

Secure File Transfer Client

Why use the file transfer client? It can make your work easier if you are more comfortable in Windows and prefer not to use text-based Unix editors such as Emacs or Vi.

Once you have logged on to Unix as above, you can open a Secure Shell File Transfer window by using menu: Window >> New File Transfer.

sshsft.jpg

You can use this window to browse, edit, or move your files on Unix. The left side shows your files and directories on your Windows PC, the right shows your Unix files and directories on the remote computer. By default, it opens to your Unix home directory (in this case, /home/users/ssharpe).

By default, the the Unix"hidden files" such as .profile are not displayed. If you wish to display them (as shown above), follow the menu: View >> Show Hidden Files

Some Unix applications depend on you first editing text file(s), then running or submitting a job on Unix. SSH Secure File Transfer can make this easier for Windows users.  

First, you need to know about a potential problem. Unix and Windows text files have different ways of marking the end of each line. To ensure that this is always translated correctly, you must check a setting on SSH. Use menu Operations >> File Transfer Mode >>ASCII. Though the file is stored on the remote machine, not your PC hard drive, the conversions are made when the file is transferred.

Having made this setting correctly, the following shows how to view and or edit Unix files on Windows. Double click the file you wish to view or edit in the right hand pane.

The file is opened in your Windows text editor. You can print it on your Windows printer using File >> Print. If you make any changes to the file, when you close your local editor, you get;

saveprompt.jpg

Click Yes and you get;

uploadprompt.jpg

Click OK and you get;

replaceprompt.jpg

Click Yes and the edited file is saved on the remote Unix machine, overwriting the original file.

Changing File Permissions

Sometime for troubleshooting, you need to alter the permissions on a file so that another person can view it. To set permissions on a Unix file or directory, click it in the right-hand pane then use menu Operation >> Properties and you get;

chmod.jpg

In this case, the file has been made readable by everyone with an account. Check the appropriate boxes and click OK

footer.gif

Cited from:http://hpc.ucalgary.ca/westgrid/ssh2.html

The SSH client can also be download from here:http://www.rayfile.com/files/663629f0-cb29-11dd-a26e-0014221b798a/

After that, start the client program, click the "Quick connect" button. Fill the destination host with sunfire.comp.nus.edu.sg, then your soc account and left the other two default( the port 22 and the type default).

After that a dialogue will be prompted out for you to fill in your password. Logged in,

use lpr -Pdmdts filename to print your file.

use lpq -Pdmdts to check the status of the printer.

What's more, before printing, you need use the transfer tool to transfer your windows' text file into that client.

發佈了116 篇原創文章 · 獲贊 0 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章