I have a server server.name
. With a folder /home/user229472/folder
I can use ssh like this:
ssh [email protected]
cd folder
...
scp works as well:
scp [email protected]:folder/file.txt .
But I cannot ssh directly into folder
:
ssh [email protected]:folder
ssh: Could not resolve hostname server.name:folder: Name or service not known
I've tried lots of variations but none works:
ssh [email protected]:22
ssh [email protected]/
ssh [email protected]/home/
ssh [email protected]/home/user229472
ssh [email protected]:/home
ssh [email protected]:/home/
ssh [email protected]:/home/user229472/folder
ssh [email protected]:/folder
ssh [email protected]:folder
This should do it:
In your case:
Ssh gives you a login shell, after verifing your identity you will be logged in the remote system. After having done this you can use commands like cd. If you want to mount a remote folder locally, use sshfs:
sshfs user@remotehost:/path/to/remotefolder /path/to/localmountpoint
Now you can acces the remotefolder via localmountpoint