Re: Executing c++ code in a server using ssh connection
- From: Regis <ordsec@xxxxxxxxx>
- Date: Wed, 19 May 2010 13:27:12 -0500
guess85 <saintofme85@xxxxxxxxx> writes:
Hi all, for a project I use c++ and opencv on a server at the
university. I connect to the server via ssh. I have a problem, I've
never used ssh and then I have no idea how to get things working. I
only know how connect using a ssh client to transfer files. Can anyone
help me? How I can execute c++ code and what kind of file I must
transfer and what directory?
Thanks to all.
Andrea
I'd advise doing some networking with your classmates or labmates to
learn. I suspect you may be very new to unix as well as ssh?
Your question is strictly off topic for this forum, as ssh just
happens to be the way you're getting onto the server.
-ssh connects you to the server. When you connect you're in a command
shell, and which one varies based on which flavor of unix the server
runs. If it's a Linux server, generally it'll be a bash shell you're
in.
-scp or sftp can help you transfer files to the server
-A text editor (vi, emacs, pico) can manipulate your c++ code on the
server
-The gcc or g++ (GNU C GNU C++) compiler is generally used to compile
your c++ source code into object code, and in the same link can link
that object code to an executable file.
Then, once you've compiled the program, you'd invoke it by prepending
the program name you specified in the -o argument of g++ with ./
./myprogram
and the program runs. If the program has a GUI aspect to it, then
things get more interesting from an ssh perspective because then you
start talking about X11 forwarding and local X servers. But if your
program just crunches some numbers or produces text console output,
things are easy.
gnu programming gcc tutorial
http://pages.cs.wisc.edu/~beechung/ref/gcc-intro.html seems reasonable.
If you're new to unix, knowing about man pages, the unix help pages is
extraordinarily useful:
$ man gcc
$ man ls
$ man ssh
If you need to compile and run gui programs remotely, then googling
on X11 forwarding and/or things like VNC client and VNC server might
become part of your world.
Good luck!
.
- References:
- Executing c++ code in a server using ssh connection
- From: guess85
- Executing c++ code in a server using ssh connection
- Prev by Date: Executing c++ code in a server using ssh connection
- Next by Date: Re: Putty's PSCP/PFTP : always "ssh_init" error (windows 98)
- Previous by thread: Executing c++ code in a server using ssh connection
- Index(es):
Relevant Pages
|