Yes, I'm aware that I wrote "SSH shell" in the title.
TL;DR: The first paragraph, the one with the link, and the one with the error message are most important.
I have my Raspberry Pi at home which I can access over the internet but only via IPv6. I'm currently in a location where I don't have IPv6.
I can execute commands on it by first logging in to a server which has both IPv4 and IPv6 and then logging into my pi from there. However, I use SSH on it for more than executing commands on it:
- git
- backups (Deja Dup)
- accessing files (SFTP)
- VNC (I tunnel through SSH and can then connect to localhost via VNC)
These are in decreasing order of importance. I want to access my git repos.
A few more details:
- I can't simply make my Pi accessible via IPv4. The modem it's behind has an IPv4 address and an IPv6 subnet but I have to use hardware I didn't choose running software I can't change. That software is not only buggy and I can't even take a look at it, but furthermore, it doesn't allow IPv4 port forwarding it all.
- I don't control the server with both IPv4 and IPv6 on it. I only have a normal user account on it and can't – for example – install new software if more than standard user rights are required for it.
Googling for a solution brought up this rather promising page, and it actually works for git. I set up new remotes for the repos I'm using, simply replacing the pi's domain name by localhost:3333
.
But it looks much more promising than that. It looks like the solution for all of the above. And it kind of started to work out!
SFTP works and I can't really determine whether backups via Deja Dup work, yet, because my connection is too slow, but it hasn't failed yet, and something's causing network traffic, so that's good and promising.
But why can't I just do ssh localhost:3333
to connect to my laptop to get a shell on my pi? The command results in this error message:
ssh: Could not resolve hostname localhost:3333: Name or service not known
I'm mainly interested in why I can't get a shell the way I'd expect it to work.
shh localhost:3333
:ssh
does not support this semantics. It isssh -p 3333 localhost
if it is the question (didn't read it all).