Sorry if this is the wrong place, but whenever I try to connect my PC from BTEP or ConnectBot, I get either "Connection Refused" or "Connection Timed Out". I followed all the guides, the part isn't blocked, and my firewall doesn't block it.
Any help?
PS: linux mint 12;openssh
Sent from my YP-G70 using XDA
How do you try to connect? By IP or hostname? Phone and PC are in LAN? Have you tried pinging your PC from phone?
I pinged successfully from phone, both are on LAN.
Sent from my YP-G70 using XDA
Are you sure SSH server is started on PC?
If it does, try ConnectBot Local thing and type 'telnet YOUR_PC_IP 22' in the shell
no luck. Does that mean the server isn't running? How would i check?
Sorry, I'm newish to linux
Sent from my YP-G70 using XDA
looks like it's not
try 'sudo service ssh start' on your PC
---------- Post added at 11:50 AM ---------- Previous post was at 11:48 AM ----------
and enable ssh autolaunch with 'sudo update-rc.d ssh defaults'
Would there possibly also be a problem with iptables or having multiple SSH services running?
Sent from my YP-G70 using XDA
multiple... i doubt that
iptables.. could be. check your rules with sudo iptables -L
also try to connect from localhost: ssh localhost should work in any case, otherwise sshd is not started
Added ssh to my startup file. sshd is started, but connection refused, even from localhost. I restarted it, started it, chuck norrised it, and attempted to threaten it with Windows, but nothing worked
Might there be a problem with me ssh config file?
What is the output of 'sudo iptables -L'?
And you can post your /etc/ssh/sshd_config somewhere, to pastebin, for example
different port than 22?
try "netstat -tulpen | grep sshd" on your linux. You should get some lines like:
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 4837 1659/sshd
the red number is ssh-port. Also you should see the used port in /etc/ssh/sshd_config
Output of sudo netstat -tulpen | grep sshd
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Have you tried reinstalling sshd? Reinstall it with:
sudo apt-get purge openssh-server
sudo apt-get install openssh-server
(With "purge" config files are also removed.)
Then try "ssh localhost" at your computer.
Will try!
Sent from my YP-G70 using XDA
Related
Hello,
I'm trying to connect to a Cisco VPN client by using VPN Connections on an Archos 70 IT 250 GB, that is rooted.
I always get a "Connection failed" message, after which the app crashes.
Did anyone succeed in getting VPN Connections working on Archos 70 IT ?
Regards,
Tonny
TonnyVanmunster said:
Hello,
I'm trying to connect to a Cisco VPN client by using VPN Connections on an Archos 70 IT 250 GB, that is rooted.
I always get a "Connection failed" message, after which the app crashes.
Did anyone succeed in getting VPN Connections working on Archos 70 IT ?
Regards,
Tonny
Click to expand...
Click to collapse
Hi,
I used to have the same error on my Galaxy S, when trying to create a VPN tunnel to my companies CISCO gateway.
The problem seems to relate to the missing tun.ko library.
I'm not sure if the Samsung Galaxy files will work for Archos, but you might want to adapt and try the following how-to: http://forum.xda-developers.com/showthread.php?t=793712&highlight=tun.ko
Regards,
Patrick
TonnyVanmunster said:
Did anyone succeed in getting VPN Connections working on Archos 70 IT ?
Click to expand...
Click to collapse
I found a possible clue. After trying several free pptp vpn services and noticing that it seemed to resolve a url one time then just hang, I set up a vpn on my lan and tried the local coffee shop connection to access it. I found that if encryption was completely disabled on the lan vpn and unchecked on the 70 IT, it would connect and I could browse, check email, etc. As soon as I set the policy on the vpn server to enable any level of encryption it was back to the resolve 1 url and hang behavior. Of course an unencrypted vpn is about as worthless as t*ts on a bull but it's the only clue I've found. As a control, I tried an ip*d touch w/encryption on against the same vpn with all levels enabled and that worked.
If anybody else who's running a local vpn can duplicate and confirm this, it's a step in the right direction!
VPN Connections 0.99 (aka get-a-robot-vpnc) working on A101IT with urukdriod-0.6
I've managed to make get-a-robot-vpnc (aka VPN Connections 0.99) work on urukdroid0.6 on Archos 101 IT.
There are two issues with default vpnc.script, and one issue with output of 'ps' command needed by VPN Connections 0.99 GUI, to check is there a connected vpnc process.
Resolving vpnc.script issues:
1. Symbolic link is missing that links /bin/busybox (or /usr/local/bin/busysbox on urukdroid) to 'which' command (cd /usr/local/bin; ln -s busybox which)
2. Symbolic link is missing that links /bin/busybox (or /usr/local/bin/busysbox on urukdroid) to 'ip' command (cd /usr/local/bin; ln -s busybox ip)
$aur0n told me that this two commands/links will be included in urukdroid-0.7.
Resolving GUI 'ps' issue (a bit harder ):
VPN COnnections GUI do 'ps | grep 'vpnc$' to see is there active vpnc process (established connection), but output of 'ps' command(s) found on urukdroid is not what GUI expects, so it cannot find vpnc proccess even if it is running and VPN is established.
On urukdroid there is 2 versions of 'ps' command:
1st is /bin/ps which is symbolic link to /bin/busybox (very old version of busybox (1.7.2, I believe) and output of ps this command is not suitable for VPN Connections (GUI)
2nd is /usr/local/bin/ps which is native ps command, but its output is also not suitable for VPN Connections (GUI)
There is a (hidden ) 3rd 'ps' command in /usr/local/bin/busybox (that version of busybox is 1.17.2) - but also not suitable output for VPN Connections (GUI).
Experimenting a bit I've found that '/usr/local/bin/ps -A' gives an suitable output, so I:
1. renamed /usr/local/bin/ps to /usr/local/bin/ps.new
2. made a script /usr/local/bin/ps with:
Code:
#!/bin/sh
ps.new -A
exit $?
3. chown root:root /usr/local/bin/ps; chmod 755 /usr/local/bin/ps
After that, everything worked.
Hope this solves issues for some of you
P.S. Forgot to mention - urukdroid 0.7 will have its own vpnc service built-in.
Works in UD 1.5
nenadr said:
I've managed to make get-a-robot-vpnc (aka VPN Connections 0.99) work on urukdroid0.6 on Archos 101 IT.
There are two issues with default vpnc.script, and one issue with output of 'ps' command needed by VPN Connections 0.99 GUI, to check is there a connected vpnc process.
Resolving vpnc.script issues:
1. Symbolic link is missing that links /bin/busybox (or /usr/local/bin/busysbox on urukdroid) to 'which' command (cd /usr/local/bin; ln -s busybox which)
2. Symbolic link is missing that links /bin/busybox (or /usr/local/bin/busysbox on urukdroid) to 'ip' command (cd /usr/local/bin; ln -s busybox ip)
$aur0n told me that this two commands/links will be included in urukdroid-0.7.
Resolving GUI 'ps' issue (a bit harder ):
VPN COnnections GUI do 'ps | grep 'vpnc$' to see is there active vpnc process (established connection), but output of 'ps' command(s) found on urukdroid is not what GUI expects, so it cannot find vpnc proccess even if it is running and VPN is established.
On urukdroid there is 2 versions of 'ps' command:
1st is /bin/ps which is symbolic link to /bin/busybox (very old version of busybox (1.7.2, I believe) and output of ps this command is not suitable for VPN Connections (GUI)
2nd is /usr/local/bin/ps which is native ps command, but its output is also not suitable for VPN Connections (GUI)
There is a (hidden ) 3rd 'ps' command in /usr/local/bin/busybox (that version of busybox is 1.17.2) - but also not suitable output for VPN Connections (GUI).
Experimenting a bit I've found that '/usr/local/bin/ps -A' gives an suitable output, so I:
1. renamed /usr/local/bin/ps to /usr/local/bin/ps.new
2. made a script /usr/local/bin/ps with:
Code:
#!/bin/sh
ps.new -A
exit $?
3. chown root:root /usr/local/bin/ps; chmod 755 /usr/local/bin/ps
After that, everything worked.
Hope this solves issues for some of you
P.S. Forgot to mention - urukdroid 0.7 will have its own vpnc service built-in.
Click to expand...
Click to collapse
Just wanted to say thanks! I'm using Urukdroid 1.5 and had the same issue. Used your trick and now VPNC connects to my companies VPN ^_^
hi ,
is it possible to send sms via adb shell from pc to android phone (via usb) ??
thegodfather13 said:
hi ,
is it possible to send sms via adb shell from pc to android phone (via usb) ??
Click to expand...
Click to collapse
Not sure why you would like to do this aside for just bragging rights or whatever BUT I think this is what you might be looking for.....
http://code.google.com/p/desktopsms/
mazdarider23 said:
Not sure why you would like to do this aside for just bragging rights or whatever BUT I think this is what you might be looking for.....
http://code.google.com/p/desktopsms/
Click to expand...
Click to collapse
Bumping this for great justice.
Have a remote server out in the boonies that I have to monitor... I can pay 10k for a cellular monitoring package or I can stick an android on it (already tested for signal and amazingly enough has it) and have it spit out console commands to ADB with it's status.
Anyone have any ideas?
---------- Post added at 10:47 PM ---------- Previous post was at 10:20 PM ----------
combustiblemonkey said:
Bumping this for great justice.
Have a remote server out in the boonies that I have to monitor... I can pay 10k for a cellular monitoring package or I can stick an android on it (already tested for signal and amazingly enough has it) and have it spit out console commands to ADB with it's status.
Anyone have any ideas?
Click to expand...
Click to collapse
Fixed my own question with a shell script (win32/64):
Code:
@echo off
adb shell am start -a android.intent.action.SENDTO -d sms:%1 --es sms_body %2 --ez exit_on_sent true
ping -n 2 localhost>nul
adb shell input keyevent 22
ping -n 2 localhost>nul
adb shell input keyevent 66
this is adapted from the linux shell version listed here:
http://webcache.googleusercontent.c...s-using-android-adb+&cd=6&hl=en&ct=clnk&gl=us
Use the country code & use quotes around your message if you have more than one word. For example:
smsScript.cmd 15551234 FUBAR!
smsScript.cmd 15551234 "zomg, the server is FUBAR!"
Hello,
I was trying your script on my phone and it gives me an error:
Code:
Error: Activity not started, unable to resolve Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=android.intent.action.SENDTO }
I'm I doing something wrong?
Thank you
Some time ago I sucessful use Linux smstools to send SMS from PC using Android phone connected via USB.
Dear all,
I installed Unbuntu Touch on my Nexus 4 yesterday (18.09.2013, with the build 20130917.1). It is working more or less, as expected :silly:
One of the problem I am facing is that the ssh server is not working. I could install (and --reinstall) it without problem (apt-get install openssh-server ssh), but if I check with "ps -ef|grep ssh") I only see the ssh-agent and the connection from another computer is not working.
Any idea?
Best regards,
Pierre
[email protected]:/# apt-get install --reinstall openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/231 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 38659 files and directories currently installed.)
Preparing to replace openssh-server 1:6.2p2-6 (using .../openssh-server_1%3a6.2p2-6_armhf.deb) ...
Unpacking replacement openssh-server ...
Processing triggers for ureadahead ...
Processing triggers for ufw ...
WARN: / is world writable!
WARN: / is group writable!
Setting up openssh-server (1:6.2p2-6) ...
[email protected]:/#
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.1.69 port 22: No route to host
[email protected]:/home/phablet/Downloads# ps -ef | grep ssh
phablet 739 711 0 09:11 ? 00:00:00 ssh-agent
I just noticed that I have the same problem...
If I had time I would look at it, too, but right now I have other things to do...
To98 said:
I just noticed that I have the same problem...
If I had time I would look at it, too, but right now I have other things to do...
Click to expand...
Click to collapse
Same problem here. ssh to another device is possible, but no acces to phablet.
Same In GNex
try
sudo service ssh start
(if you are root or not you must use sudo)
but it does not automatically start when reboot
Still not wokring
[email protected]:/# service ssh start
ssh start/running, process 5890
[email protected]:~$ ssh [email protected]
ssh: connect to host 192.168.1.69 port 22: No route to host
[email protected]:~$ ps -ef|grep 5890
vmalep 12613 12544 0 13:00 pts/4 00:00:00 grep --color=auto 5890
chaoskernel said:
try
sudo service ssh start
(if you are root or not you must use sudo)
but it does not automatically start when reboot
Click to expand...
Click to collapse
thank you! installed version 57 and used
sudo service ssh start
work fine!
I recently bought a Nexus 7 Flo tablet running the latest Android 4.4. I've since been trying to spoof a MAC address on it, but for some reason the wireless card seems to refuse to use the spoofed mac no matter what I do.
There's a more detailed discussion what I've tried in android.stackexchange.com/questions/57922/wifi-network-not-accessible-with-modified-mac-address (forum won't let me link), but I'll repeat the main points here. I have tried both ip link set wlan0 address XX:XX:XX:XX:XX:XX and busybox ifconfig wlan0 hw ether XX:XX:XX:XX:XX:XX. They both result in the MAC address being changed as far as I can tell from the output of ip link and busybox ifconfig, but when connecting to a network with MAC filtering with the spoofed MAC address being allowed, the device fails to connect. /sys/class/net/wlan0/address also shows the spoofed address. If I use the device's stock MAC and add this to the filter on the AP, then the device connects successfully.
Has anyone experienced anything similar on KitKat devices?
Jonhoo said:
Has anyone experienced anything similar on KitKat devices?
Click to expand...
Click to collapse
Haven't tried anything, yet. Just wondering if you've had any success with this since it's been a while. Thanx=)
pan.droid said:
Haven't tried anything, yet. Just wondering if you've had any success with this since it's been a while. Thanx=)
Click to expand...
Click to collapse
No, unfortunately not. I ended up buying a Samsung Galaxy S II where I can change the MAC successfully for demo purposes. I would still really like to get this working on an up-to-date tablet though..
Bummer. Okay, thanx.
---------- Post added at 03:54 PM ---------- Previous post was at 03:53 PM ----------
This is hopeful, but not a silver bullet... http://forum.xda-developers.com/showthread.php?t=2180809
pan.droid said:
This is hopeful, but not a silver bullet... http://forum.xda-developers.com/showthread.php?t=2180809
Click to expand...
Click to collapse
Interesting...
There seems to be a couple of suggestions here that I will try when I get back to work next week:
- Enable Airplane mode before changing the MAC, then turn airplane mode off again and your WiFi should work
- Deleting /persist/wifi before changing the MAC
- Using this spoofing app
Good news everyone!
/persist/wifi/.macaddr seems to be the key to changing the MAC, *and* it allows the MAC to be changed *permanently*!
Code:
$ adb shell
$ su
# cd /persist/wifi
# echo -n "112233445566" > .macaddr
# ^D
$ ^D
$ adb reboot
And voilà, MAC changed even after reboot, and connects without a problem!
Jonhoo said:
Good news everyone!
/persist/wifi/.macaddr seems to be the key to changing the MAC, *and* it allows the MAC to be changed *permanently*!
Code:
$ adb shell
$ su
# cd /persist/wifi
# echo -n "112233445566" > .macaddr
# ^D
$ ^D
$ adb reboot
And voilà, MAC changed even after reboot, and connects without a problem!
Click to expand...
Click to collapse
Hi,
I stumbled upon your post. I'm trying to do the same on my Nexus 5. I found your method works in changing my MAC address but it doesn't change to the string I put in the quotes. What I found is that the address I end up with is the unicode values of the first 6 characters. Is there some special format for this file?
Thanks!
tmagritte said:
I found your method works in changing my MAC address but it doesn't change to the string I put in the quotes. What I found is that the address I end up with is the unicode values of the first 6 characters. Is there some special format for this file?
Click to expand...
Click to collapse
Hmm, that's quite strange. From what I remember, simply using echo worked fine for me.
What you can do instead is this:
Code:
echo -ne '\x11\x22\x33\x44\x55\x66' > .macaddr
Let me know if it works!
Jonhoo said:
Hmm, that's quite strange. From what I remember, simply using echo worked fine for me.
What you can do instead is this:
Code:
echo -ne '\x11\x22\x33\x44\x55\x66' > .macaddr
Let me know if it works!
Click to expand...
Click to collapse
Brilliant!
Thanks so much!
---------- Post added at 01:31 PM ---------- Previous post was at 01:31 PM ----------
I'm guessing for some reason on the Nexus 7 it uses a text file but a binary file on the Nexus 5...
I also found a couple of ways to activate the new MAC address without requiring a reboot. This is useful if you want to be able to change MAC address dynamically using Tasker or similar.
The least obtrusive method I found is adding:
busybox ifconfig wlan0 down
busybox ifconfig wlan0 up
commands after the echo command. This will briefly turn off the WiFi adapter and when it comes back on it will have the new MAC address. I actually found the busybox ifconfig wlan0 up command isn't strictly necessary, at least on the Nexus 5, as it seems to get reactivated automatically after you take it down.
You can confirm the new MAC is in effect by opening a new terminal emulator window and running:
busybox ifconfig wlan0
Interestingly, if you go into Wifi Settings, under advanced settings it still shows the old MAC address but the WiFi adapter is clearly running with the new one as indicated by ifconfig and the ability to connect to a MAC filtered router.
Alternatively, toggling on then off airplane mode will also activate the new MAC and it even shows the new MAC under the advanced WiFi settings.
I like the first option as you'd be able to automate dynamic changes for a particular network without the risk of interrupting voice or cellular data connections when it happens.
tmagritte said:
The least obtrusive method I found is adding:
busybox ifconfig wlan0 down
busybox ifconfig wlan0 up
Click to expand...
Click to collapse
I tried using the approach above to reset the MAC on-the-fly, but it doesn't seem to work on my Nexus 5 4.4.4.
For now I'm sticking with "reboot" at the end of my .sh script, which works well. Any thoughts / advice are appreciated. Thanks!
great but
Jonhoo said:
Good news everyone!
/persist/wifi/.macaddr seems to be the key to changing the MAC, *and* it allows the MAC to be changed *permanently*!
Code:
$ adb shell
$ su
# cd /persist/wifi
# echo -n "112233445566" > .macaddr
# ^D
$ ^D
$ adb reboot
And voilà, MAC changed even after reboot, and connects without a problem!
Click to expand...
Click to collapse
helo i tried u r method and i succeed the problem its gaining random mac address not specified mac address i would like to copy iPhone mac address to my android but it is failed please help me
Hi everyone,
Does anyone know how to remove this method of mac change and go back to the original?
Many thanks!
Using the app "better terminal pro" it has an ssh client built in (maybe the free version has too though i'm using pro)..
I can ssh to my ssh server and log in via password.
but i'd like to go in passwordless. For that, I want to create keys.. So, i'm running ssh-keygen. Better terminal has it..
When I run ssh-keygen, it says
Generating public/private rsa key pair
segmentation fault
this happens where I do su beforehand or not..
Any ideas how to resolve that?
gardina said:
Using the app "better terminal pro" it has an ssh client built in (maybe the free version has too though i'm using pro)..
I can ssh to my ssh server and log in via password.
but i'd like to go in passwordless. For that, I want to create keys.. So, i'm running ssh-keygen. Better terminal has it..
When I run ssh-keygen, it says
Generating public/private rsa key pair
segmentation fault
this happens where I do su beforehand or not..
Any ideas how to resolve that?
Click to expand...
Click to collapse
Worth noting that ssh -? shows it's dropbear ssh that it uses..
and looking in the directory made by better terminal, dropbear includes an executable called dropbear(which I haven't tried much), and an executable called dropbearkey(which I have tried)
You can use dropbear key to generate the key.. That's instead of ssh-keygen
I understand and have done the steps below and they work..
I don't have enough posts yet to enable me to post a URL, but a URL on journal DOT ulyco DOT com mentions this procedure(which shows the syntax and usage of dropbearkey, amongst other things)-
cd
dropbearkey -t rsa -f ~/.ssh/id_rsa
dropbearkey -y -f ~/.ssh/id_rsa | grep ssh-rsa >~/.ssh/id_rsa.pub
scp ~/.ssh/id_rsa.pub [email protected]:transformer-key
# now you'll need to go to the remote server and put the key in authorized_keys
# once you've set that up, to use it you need to specify the key:
ssh -i ~/.ssh/id_rsa [email protected]
That said.. Another way may be to generate a key on another machine and ensure the right key(s) are on client/server. (private key on client, public key on server in authorized_keys file, and you could put the public key on the client too). That(generating the key elsewhere and placing it on client/server) might be how it's meant to be done as of writing, with juicessh
Anyhow, dropbearkey is very good, it generates the key fine, both the private key, and the public key from the private key.