Bitcoin Forum

Bitcoin => Mining => Topic started by: darkpandora on June 07, 2011, 11:58:58 AM



Title: Need help with SSH please.
Post by: darkpandora on June 07, 2011, 11:58:58 AM
i have my mining rig in my kitchen, i have installed ssh on the mining rig (ubuntu) and i dont know how to start my mining with SSH putty from my desktop computer (win7) in my room. how do i connect to my mining rig and how do i make it not exit/stop mining when i close putty on my desktop computer?

please help, i have set everything up, but im struggling with putty and ssh.

thanks.


Title: Re: Need help with SSH please.
Post by: SomeoneWeird on June 07, 2011, 12:06:02 PM
i have my mining rig in my kitchen, i have installed ssh on the mining rig (ubuntu) and i dont know how to start my mining with SSH putty from my desktop computer (win7) in my room. how do i connect to my mining rig and how do i make it not exit/stop mining when i close putty on my desktop computer?

please help, i have set everything up, but im struggling with putty and ssh.

thanks.

Use screen.
http://www.howtogeek.com/howto/ubuntu/keep-your-ssh-session-running-when-you-disconnect/


Title: Re: Need help with SSH please.
Post by: darkpandora on June 07, 2011, 12:08:42 PM
i have my mining rig in my kitchen, i have installed ssh on the mining rig (ubuntu) and i dont know how to start my mining with SSH putty from my desktop computer (win7) in my room. how do i connect to my mining rig and how do i make it not exit/stop mining when i close putty on my desktop computer?

please help, i have set everything up, but im struggling with putty and ssh.

thanks.

Use screen.
http://www.howtogeek.com/howto/ubuntu/keep-your-ssh-session-running-when-you-disconnect/

thanks very much. but how do i connect to my ubunty mining rig with putty?
i will follow this guide, i will comment later today if it workes:) thanks


Title: Re: Need help with SSH please.
Post by: SomeoneWeird on June 07, 2011, 12:12:43 PM
i have my mining rig in my kitchen, i have installed ssh on the mining rig (ubuntu) and i dont know how to start my mining with SSH putty from my desktop computer (win7) in my room. how do i connect to my mining rig and how do i make it not exit/stop mining when i close putty on my desktop computer?

please help, i have set everything up, but im struggling with putty and ssh.

thanks.

Use screen.
http://www.howtogeek.com/howto/ubuntu/keep-your-ssh-session-running-when-you-disconnect/

thanks very much. but how do i connect to my ubunty mining rig with putty?
i will follow this guide, i will comment later today if it workes:) thanks

Run ifconfig on your ubuntu machine, putty into that ip from your windows machine...


Title: Re: Need help with SSH please.
Post by: phungus on June 07, 2011, 12:30:17 PM
Like the others said, Putty into your Ubuntu server.

When you log in, execute the command 'screen'. Press Return on the opening startup message.

You will now be in the screen session. The screen command is Control-A and then the command. For instance, to get help, press Ctrl-A ? (Ctrl-A question mark).

My most used screen commands:

Ctrl-A c        <- to create a new window (or as many as you like)
Ctrl-A 0        <- to switch back to the first window
Ctrl-A 1        <- to switch to window 1

Ctrl-A Ctrl-[  <- Enter cut and paste mode. Move the cursor around, hit space where you want to start, hit space again to copy the text
Ctrl-A Ctrl-]  <- Paste the text you just selected

Ctrl-A d        <- Detach screen but leave it running in the background so you can come back later.


You can now log out. When you log back in, run 'screen -r' to re-attach to your session.


If your session crashes or you get disconnected for whatever reason, screen will sometimes not know about it for a minute or two. In this case, when you log back in, run 'screen -D -r' to power-detach the session and re-attach it.


Hope this gets you jumpstarted.

lw


Title: Re: Need help with SSH please.
Post by: Crs on June 07, 2011, 12:41:56 PM
Install putty and connect to you machine via ssh.
After that you can start your bitcoin workers with this command:

sudo python phoenix.py -u http://myusername.myworker:mypassword@mining.bitcoin.cz:8332/ DEVICE=0 -k phatk PLATFORM=1 BFI_INT VECTORS AGGRESSION=10  2>&1 > bitcoin0.log &

this command will start your mining session and keep it in the background.
The "2>&1 > bitcoin0.log" part will write your mining software's output into a log file (bitcoin0.log, 0 for your first gpu, 1 for your second gpu, etc)
You can close and open your ssh session as often as you like.
To check your phoneix miner output do this:

root@nmc-GA-790FXTA-UD5:/home/nmc/phoenix# tail bitcoin0.log
[07/06/2011 15:38:53] Result: 6d7502cd accepted
[07/06/2011 15:39:01] Result: 965a616d accepted
[07/06/2011 15:39:03] Result: 5c3fc585 accepted
[07/06/2011 15:39:07] Result: 7d1b6a3b accepted
[07/06/2011 15:39:14] Result: 8a3fed9c accepted
[07/06/2011 15:39:16] Result: 48ff0a71 accepted
[07/06/2011 15:39:38] Result: 4807539e accepted
[07/06/2011 15:39:40] Result: 131f1924 accepted
[07/06/2011 15:39:41] Result: 7e48e241 accepted
[322.62 Mhash/sec] [33497 Accepted] [1071 Rejected] [RPC]



Title: Re: Need help with SSH please.
Post by: phungus on June 07, 2011, 12:57:02 PM

Yes, but with screen you can leave one window running the mining software, and another one idling on IRC. :-)


lw


Title: Re: Need help with SSH please.
Post by: darkpandora on June 07, 2011, 07:08:58 PM
Like the others said, Putty into your Ubuntu server.

When you log in, execute the command 'screen'. Press Return on the opening startup message.

You will now be in the screen session. The screen command is Control-A and then the command. For instance, to get help, press Ctrl-A ? (Ctrl-A question mark).

My most used screen commands:

Ctrl-A c        <- to create a new window (or as many as you like)
Ctrl-A 0        <- to switch back to the first window
Ctrl-A 1        <- to switch to window 1

Ctrl-A Ctrl-[  <- Enter cut and paste mode. Move the cursor around, hit space where you want to start, hit space again to copy the text
Ctrl-A Ctrl-]  <- Paste the text you just selected

Ctrl-A d        <- Detach screen but leave it running in the background so you can come back later.


You can now log out. When you log back in, run 'screen -r' to re-attach to your session.


If your session crashes or you get disconnected for whatever reason, screen will sometimes not know about it for a minute or two. In this case, when you log back in, run 'screen -D -r' to power-detach the session and re-attach it.


Hope this gets you jumpstarted.

lw


thanks.. its working very well:) :)
but it seems i have a problem or tow.

i run putty and connect to my ubuntu after logging in. i typre screen command. then start mining on gpu1. i press "ctrl a c t" to create a new window and i start mining on gpu2. then i create another window to check temperature.

i cant switch back to screen 1 or 2 or 3.. all it does is showing me the 2 latest screens, and that is gpu2 and temperature check screen.
when i press  "ctrl a w" nothing happens when i want to see how many screens are opened.

the only thing works is "ctrl a a" it switches between the tow last screens...


Title: Re: Need help with SSH please.
Post by: xlcus on June 07, 2011, 07:19:51 PM
ctrl+a [space] cycles round all of the screens


Title: Re: Need help with SSH please.
Post by: darkpandora on June 07, 2011, 11:58:29 PM
ctrl+a [space] cycles round all of the screens

it says "no other window."

for some reason when i close putty and connect again, i cant access the screens and i know they are running because my gpu temperature is 67c.


Title: Re: Need help with SSH please.
Post by: darkpandora on June 08, 2011, 08:04:17 PM
bump


Title: Re: Need help with SSH please.
Post by: melanarchy on June 08, 2011, 09:28:08 PM
screen -r
(or screen -rd)

will connect you back to the existing windows

^a-c makes a new virtual window once you're back inside of screen


Title: Re: Need help with SSH please.
Post by: darkpandora on June 08, 2011, 11:00:16 PM
screen -r
(or screen -rd)

will connect you back to the existing windows

^a-c makes a new virtual window once you're back inside of screen

i did type "screen -d -r" then i get this:


aram@aram-MS-7640:~$ screen -d -r
There are several suitable screens on:
        2345.pts-0.aram-Ms (06/09/2011 12:52:20 AM)        (Detached)
        1878.pts-0.aram-Ms (06/08/2011 08:21:02 PM)        (Attached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.


then i type "screen -r" but i can only see one of the screens, i cant switch. i press "ctrl A 1" or "ctrl A 2" or space. it tells me "no other window".


Title: Re: Need help with SSH please.
Post by: CD-RW on June 08, 2011, 11:11:10 PM
Will this help? unixrefcard.pdf (http://doc.es.aau.dk/fileadmin/doc.kom.aau.dk/refcards/unixrefcard.pdf)


Title: Re: Need help with SSH please.
Post by: darkpandora on June 08, 2011, 11:53:21 PM
Will this help? unixrefcard.pdf (http://doc.es.aau.dk/fileadmin/doc.kom.aau.dk/refcards/unixrefcard.pdf)

thanks:)
it really helped me..

i solved my problem this way:

screen -ls

2345.pts-0.aram-Ms (06/09/2011 12:52:19 AM)        (Detached)
1878.pts-0.aram-Ms (06/08/2011 08:21:01 PM)        (Attached)


the screen that was attached, i couldn't connect to it, because it thought i was already viewing it. but i could connect to screen 2345. so i had to detach screen 1878: screen -d 1878

it detached the screen. then connect to the screen: screen -r 1878

the problem was solved. i could view both screens... :):D


Title: Re: Need help with SSH please.
Post by: xlcus on June 09, 2011, 10:55:42 AM
From what you've pasted, it appears you have multiple copies of screen running.

You only need to run one copy of screen (i.e. only type the command screen once).  From within one instance of screen you can create multiple pages (for want of a better word), which you can then cycle around with ctrl+a [space]


Title: Re: Need help with SSH please.
Post by: darkpandora on June 09, 2011, 04:42:13 PM
From what you've pasted, it appears you have multiple copies of screen running.

You only need to run one copy of screen (i.e. only type the command screen once).  From within one instance of screen you can create multiple pages (for want of a better word), which you can then cycle around with ctrl+a [space]


i dont know. but i figured it out how to get it to work:D but, i have one more question. how do i access my mining rig with putty from another ip or computer (my brothers house in this case)? from my house i access ubuntu by typing the LAN adress (10.0.0.3) on putty. what about none local connection?


Title: Re: Need help with SSH please.
Post by: SomeoneWeird on June 09, 2011, 09:30:36 PM
From what you've pasted, it appears you have multiple copies of screen running.

You only need to run one copy of screen (i.e. only type the command screen once).  From within one instance of screen you can create multiple pages (for want of a better word), which you can then cycle around with ctrl+a [space]


i dont know. but i figured it out how to get it to work:D but, i have one more question. how do i access my mining rig with putty from another ip or computer (my brothers house in this case)? from my house i access ubuntu by typing the LAN adress (10.0.0.3) on putty. what about none local connection?

You need to login to your router and forward port 22, then grab your external ip from something like http://ipchicken.com and use that in putty when your not home.